Skip to content

2023_R2 compile fixes #2687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 8, 2025
Merged

2023_R2 compile fixes #2687

merged 6 commits into from
Jan 8, 2025

Conversation

nunojsa
Copy link
Collaborator

@nunojsa nunojsa commented Jan 7, 2025

PR Description

This patchset has a set of fixes so that an allyesconfig compiles (at least) for ARM and ARM64.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have tested the changes on the relevant hardware
  • I have updated the documentation outside this repo accordingly (if there is the case)

ukleinek and others added 6 commits January 7, 2025 08:41
spi_split_transfers_maxsize() was recently changed to not take a gfp
parameter. Fix this caller accordingly to make the spi-bcm2835 driver
compile again.

Fixes: 98847e6 ("spi: drop gpf arg from __spi_split_transfer_maxsize()")
Signed-off-by: Uwe Kleine-König <[email protected]>
(cherry picked from commit d9dc785)
The patch posted at
https://lore.kernel.org/r/[email protected]
was based on next-20240207 (and was applied as c0c0293 ("spi: drop
gpf arg from __spi_split_transfer_maxsize()") for v6.9-rc1).

However when applied to a v6.6 based tree, the conflict with commit
f6cd662 ("spi: stm32: add st,stm32mp25-spi compatible supporting
STM32MP25 soc") wasn't resolved correctly.

Fix that to make the driver build again.

Fixes: 98847e6 ("spi: drop gpf arg from __spi_split_transfer_maxsize()")
Signed-off-by: Uwe Kleine-König <[email protected]>
(cherry picked from commit 455592e)
This reverts commit f6e3323.

The commit is clearly bogus and does not even compile with clang 18.1.8.
Hence, let's revert it and wait until AMD fixes it (unless we need it
first). Here are the compiler complains (warnings included):

././include/linux/compiler_types.h:357:45: error: call to '__compiletime_assert_273' declared with attribute error: FIELD_GET: mask is zero
  357 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)

  CALL    scripts/checksyscalls.sh
  CC      drivers/iio/adc/xilinx-ams.o
drivers/iio/adc/xilinx-ams.c: In function 'ams_update_alarm':
drivers/iio/adc/xilinx-ams.c:416:51: warning: left shift count >= width of type [-Wshift-count-overflow]
  416 |                              (AMS_ISR1_ALARM_MASK << AMS_ISR1_ALARM_SHIFT)),
      |                                                   ^~
In file included from ./include/linux/bits.h:6,
                 from drivers/iio/adc/xilinx-ams.c:11:
drivers/iio/adc/xilinx-ams.c: In function 'ams_get_alarm_mask':
./include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
    7 | #define BIT(nr)                 (UL(1) << (nr))
      |                                        ^~
drivers/iio/adc/xilinx-ams.c:921:24: note: in expansion of macro 'BIT'
  921 |                 return BIT(AMS_ALARM_BIT_TEMP_OT_REMOTE);
      |                        ^~~
drivers/iio/adc/xilinx-ams.c: In function 'ams_irq':
drivers/iio/adc/xilinx-ams.c:1129:42: warning: left shift count >= width of type [-Wshift-count-overflow]
 1129 |                     (AMS_ISR1_ALARM_MASK << AMS_ISR1_ALARM_SHIFT)) |

Signed-off-by: Nuno Sa <[email protected]>
The update was not updated during the stable merge. Hence, do it know so
we do not have a broken driver.

Fixes: 3a22b09 ("Merge tag 'v6.1.70' of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git")
Signed-off-by: Nuno Sa <[email protected]>
Make sure to include slab.h so that the driver compiles.

Signed-off-by: Nuno Sa <[email protected]>
User space types should be '__uXX' instead of 'uXX'. Furthermore,
types.h needs to be included. Otherwise we get a failure doing

HDRTEST usr/include/misc/xilinx_puf.h

Signed-off-by: Nuno Sa <[email protected]>
@nunojsa nunojsa merged commit d85aaf8 into 2023_R2 Jan 8, 2025
11 of 13 checks passed
@nunojsa nunojsa deleted the staging/2023_R2-fixes branch January 8, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants