Commit Graph

4 Commits

Author SHA1 Message Date
Dmitry Baryshkov
bde90b4a15 cdba: replace licence headers with SPDX identifiers
Replace all license headers with the SPDX-License-Identitier headers to
follow the current recommendations.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 18:06:19 +02:00
Krzysztof Kozlowski
a785bd1ab1 list: fix clang -Wcast-align on container_of
Cast via (void *) to fix -Wcast-align clang and GCC on armv7
(arm-linux-gnueabi-gcc) warning for container_of:

  device.c:91:2: warning: cast from 'char *' to 'typeof (*(device)) *' (aka 'struct device *') increases required alignment from 1 to 8 [-Wcast-align]
          list_for_each_entry(device, &devices, node) {
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ./list.h:91:14: note: expanded from macro 'list_for_each_entry'
          for (item = list_entry_first(list, typeof(*(item)), member); \
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ./list.h:85:2: note: expanded from macro 'list_entry_first'
          container_of((list)->next, type, member)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ./list.h:39:3: note: expanded from macro 'container_of'
                  (type *)((char *)__mptr - offsetof(type, member)); \
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-05-08 15:02:37 -05:00
Krzysztof Kozlowski
2af3911be5 list: drop unneeded const to fix -Wcast-qual
Fixes:

  device.c: In function ‘device_info’:
  list.h:39:26: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
     39 |                 (type *)((char *)__mptr - offsetof(type, member)); \
        |                          ^
  list.h:85:9: note: in expansion of macro ‘container_of’
     85 |         container_of((list)->next, type, member)
        |         ^~~~~~~~~~~~
  list.h:91:21: note: in expansion of macro ‘list_entry_first’
     91 |         for (item = list_entry_first(list, typeof(*(item)), member); \
        |                     ^~~~~~~~~~~~~~~~
  device.c:303:9: note: in expansion of macro ‘list_for_each_entry’
    303 |         list_for_each_entry(device, &devices, node) {
        |         ^~~~~~~~~~~~~~~~~~~

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-05-08 15:02:37 -05:00
Bjorn Andersson
4efcfb4456 bad: Add initial cdba backend implementation
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-03-12 17:43:55 -07:00