Skip to content
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

[WIP] [Deepin Kernel SIG] Fix errors with clang-19 #499

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions arch/loongarch/include/asm/kvm_para.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct kvm_steal_time {
*/
static __always_inline long kvm_hypercall(u64 fid)
{
register long ret asm("v0");
register long ret asm("a0");
register unsigned long fun asm("a0") = fid;

__asm__ __volatile__(
Expand All @@ -56,7 +56,7 @@ static __always_inline long kvm_hypercall(u64 fid)

static __always_inline long kvm_hypercall1(u64 fid, unsigned long arg0)
{
register long ret asm("v0");
register long ret asm("a0");
register unsigned long fun asm("a0") = fid;
register unsigned long a1 asm("a1") = arg0;

Expand All @@ -73,7 +73,7 @@ static __always_inline long kvm_hypercall1(u64 fid, unsigned long arg0)
static __always_inline long kvm_hypercall2(u64 fid,
unsigned long arg0, unsigned long arg1)
{
register long ret asm("v0");
register long ret asm("a0");
register unsigned long fun asm("a0") = fid;
register unsigned long a1 asm("a1") = arg0;
register unsigned long a2 asm("a2") = arg1;
Expand All @@ -91,7 +91,7 @@ static __always_inline long kvm_hypercall2(u64 fid,
static __always_inline long kvm_hypercall3(u64 fid,
unsigned long arg0, unsigned long arg1, unsigned long arg2)
{
register long ret asm("v0");
register long ret asm("a0");
register unsigned long fun asm("a0") = fid;
register unsigned long a1 asm("a1") = arg0;
register unsigned long a2 asm("a2") = arg1;
Expand All @@ -111,7 +111,7 @@ static __always_inline long kvm_hypercall4(u64 fid,
unsigned long arg0, unsigned long arg1, unsigned long arg2,
unsigned long arg3)
{
register long ret asm("v0");
register long ret asm("a0");
register unsigned long fun asm("a0") = fid;
register unsigned long a1 asm("a1") = arg0;
register unsigned long a2 asm("a2") = arg1;
Expand All @@ -132,7 +132,7 @@ static __always_inline long kvm_hypercall5(u64 fid,
unsigned long arg0, unsigned long arg1, unsigned long arg2,
unsigned long arg3, unsigned long arg4)
{
register long ret asm("v0");
register long ret asm("a0");
register unsigned long fun asm("a0") = fid;
register unsigned long a1 asm("a1") = arg0;
register unsigned long a2 asm("a2") = arg1;
Expand Down
2 changes: 1 addition & 1 deletion arch/loongarch/kernel/legacy_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ static __initconst const struct {
},
};

void __init acpi_arch_init (){
void __init acpi_arch_init (void){
if (bpi_version == BPI_VERSION_NONE) {
return;
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/i3c/master/i3c-master-phytium.c
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,8 @@ static int phytium_i3c_master_probe(struct platform_device *pdev)
{
struct phytium_i3c_master *master;
struct resource *res;
int ret, irq;
int ret = -EINVAL;
int irq;
u32 val;

master = devm_kzalloc(&pdev->dev, sizeof(*master), GFP_KERNEL);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-desc.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ static void fxgmac_tx_desc_init_channel(struct fxgmac_channel *channel)
struct fxgmac_desc_data *desc_data;
int start_index = ring->cur;
unsigned int i;
start_index = start_index;

/* Initialize all descriptors */
for (i = 0; i < ring->dma_desc_count; i++) {
desc_data = FXGMAC_GET_DESC_DATA(ring, i);
Expand Down
30 changes: 13 additions & 17 deletions drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,24 +482,25 @@ static void fxgmac_config_multicast_mac_hash_table(struct fxgmac_pdata *pdata,
writereg(pdata->pAdapter, regval, pdata->mac_regs + hash_reg);
}

static void fxgmac_set_mac_hash_table(struct fxgmac_pdata *pdata)
{
#ifndef DPDK
#if FXGMAC_MAC_HASH_TABLE
static void fxgmac_set_mac_hash_table(struct fxgmac_pdata *pdata)
{

struct net_device *netdev = pdata->netdev;
struct netdev_hw_addr *ha;

fxgmac_config_multicast_mac_hash_table(pdata, (unsigned char *)0, 1);
netdev_for_each_mc_addr(ha, netdev) {
fxgmac_config_multicast_mac_hash_table(pdata, ha->addr, 1);
}
#endif
pdata = pdata;

}
#else
(void)pdata;
#endif
static inline void fxgmac_set_mac_hash_table(void)
{
}
#endif /* FXGMAC_MAC_HASH_TABLE */
#endif /* DPDK */

static int fxgmac_set_mc_addresses(struct fxgmac_pdata *pdata)
{
Expand Down Expand Up @@ -612,16 +613,14 @@ static int fxgmac_config_rx_mode(struct fxgmac_pdata *pdata)
return 0;
}

#ifdef FXGMAC_WAIT_TX_STOP
static void fxgmac_prepare_tx_stop(struct fxgmac_pdata *pdata,
struct fxgmac_channel *channel)
{
#ifdef FXGMAC_WAIT_TX_STOP
unsigned int tx_dsr, tx_pos, tx_qidx;
unsigned long tx_timeout;
unsigned int tx_status;

pdata = pdata;

/* Calculate the status register to read and the position within */
if (channel->queue_index < DMA_DSRX_FIRST_QUEUE) {
tx_dsr = DMA_DSR0;
Expand Down Expand Up @@ -655,11 +654,12 @@ static void fxgmac_prepare_tx_stop(struct fxgmac_pdata *pdata,
netdev_info(pdata->netdev,
"timed out waiting for Tx DMA channel %u to stop\n",
channel->queue_index);
}
#else
pdata = pdata;
channel = channel;
#endif
static inline void fxgmac_prepare_tx_stop(void)
{
}
#endif /* FXGMAC_WAIT_TX_STOP */

static void fxgmac_enable_tx(struct fxgmac_pdata *pdata)
{
Expand Down Expand Up @@ -1229,7 +1229,6 @@ static void fxgmac_config_rx_fup_enable(struct fxgmac_pdata *pdata)

static int fxgmac_config_tx_coalesce(struct fxgmac_pdata *pdata)
{
pdata = pdata;
return 0;
}

Expand Down Expand Up @@ -2318,7 +2317,6 @@ static int fxgmac_write_rss_reg(struct fxgmac_pdata *pdata, unsigned int type,
unsigned int index, u32 val)
{
int ret = 0;
type = type;

writereg(pdata->pAdapter, val, (pdata->base_mem + index));

Expand Down Expand Up @@ -4563,7 +4561,6 @@ static int fxgmac_dismiss_DMA_int(struct fxgmac_channel *channel, int int_id)
{
u32 dma_ch_ier;

int_id = int_id;
dma_ch_ier = readreg(channel->pdata->pAdapter,
FXGMAC_DMA_REG(channel, DMA_CH_SR /*1160*/));
writereg(channel->pdata->pAdapter, dma_ch_ier,
Expand Down Expand Up @@ -4885,7 +4882,6 @@ static void fxgmac_pre_powerdown(struct fxgmac_pdata *pdata, bool phyloopback)
#ifdef FXGMAC_LINK_SPEED_CHECK_PHY_LINK
int link;
#endif
speed = speed;

fxgmac_disable_rx(pdata);

Expand Down
3 changes: 2 additions & 1 deletion drivers/pwm/pwm-phytium.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ static int pwm_phytium_set_dbcly(struct pwm_chip *chip, unsigned int updbcly, un
{
struct phytium_pwm_chip *our_chip = to_phytium_pwm_chip(chip);
u32 reg;
u64 dbcly, cycles, upcycles, dwcycles;
u64 cycles, upcycles, dwcycles;
u64 dbcly = 0;

reg = readl(our_chip->base + REG_TPERIOD);
if (has_acpi_companion(chip->dev))
Expand Down
40 changes: 20 additions & 20 deletions sound/soc/phytium/phytium_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -975,33 +975,25 @@ static const u32 fifo_width[COMP_MAX_WORDSIZE] = {
12, 16, 20, 24, 32, 0, 0, 0
};

/* Width of (DMA) bus */
static const u32 bus_widths[COMP_MAX_DATA_WIDTH] = {
DMA_SLAVE_BUSWIDTH_1_BYTE,
DMA_SLAVE_BUSWIDTH_2_BYTES,
DMA_SLAVE_BUSWIDTH_4_BYTES,
DMA_SLAVE_BUSWIDTH_UNDEFINED
};

/* PCM format to support channel resolution */
static const u32 formats[COMP_MAX_WORDSIZE] = {
SNDRV_PCM_FMTBIT_S16_LE,
SNDRV_PCM_FMTBIT_S16_LE,
SNDRV_PCM_FMTBIT_S24_LE,
SNDRV_PCM_FMTBIT_S24_LE,
SNDRV_PCM_FMTBIT_S32_LE,
0,
0,
0
};

static int phytium_configure_dai(struct i2s_phytium *dev)
{
u32 comp1 = i2s_read_reg(dev->regs, dev->i2s_reg_comp1);
u32 comp2 = i2s_read_reg(dev->regs, dev->i2s_reg_comp2);
u32 fifo_depth = 1 << (1 + COMP1_FIFO_DEPTH_GLOBAL(comp1));
u32 idx;

/* PCM format to support channel resolution */
static const u32 formats[COMP_MAX_WORDSIZE] = {
SNDRV_PCM_FMTBIT_S16_LE,
SNDRV_PCM_FMTBIT_S16_LE,
SNDRV_PCM_FMTBIT_S24_LE,
SNDRV_PCM_FMTBIT_S24_LE,
SNDRV_PCM_FMTBIT_S32_LE,
0,
0,
0
};

if (COMP1_TX_ENABLED(comp1)) {
dev_dbg(dev->dev, " phytium: play supported\n");
idx = COMP1_TX_WORDSIZE_0(comp1);
Expand Down Expand Up @@ -1038,6 +1030,14 @@ static int phytium_configure_dai_by_dt(struct i2s_phytium *dev)
u32 idx2;
int ret;

/* Width of (DMA) bus */
static const u32 bus_widths[COMP_MAX_DATA_WIDTH] = {
DMA_SLAVE_BUSWIDTH_1_BYTE,
DMA_SLAVE_BUSWIDTH_2_BYTES,
DMA_SLAVE_BUSWIDTH_4_BYTES,
DMA_SLAVE_BUSWIDTH_UNDEFINED
};

if (WARN_ON(idx >= ARRAY_SIZE(bus_widths)))
return -EINVAL;

Expand Down
Loading