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

[Motorcomm] [Deepin Kernel SIG] Fix compile errors with clang-19 #506

Merged
Merged
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
22 changes: 8 additions & 14 deletions drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,23 +486,23 @@ 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 FUXI_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;

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 /* FUXI_MAC_HASH_TABLE */
#endif /* DPDK */

static int fxgmac_add_mac_addresses(struct fxgmac_pdata *pdata)
{
Expand Down Expand Up @@ -608,8 +608,6 @@ static void fxgmac_prepare_tx_stop(struct fxgmac_pdata *pdata,
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 @@ -1318,7 +1316,6 @@ static void fxgmac_tx_desc_init(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++) {
Expand Down Expand Up @@ -1613,9 +1610,8 @@ static void fxgmac_config_rx_fup_enable(struct fxgmac_pdata *pdata)
}
}

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

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

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

Expand Down Expand Up @@ -5016,7 +5011,6 @@ static int fxgmac_dismiss_DMA_int(struct fxgmac_channel *channel, int int_id)
{
unsigned int 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
4 changes: 2 additions & 2 deletions drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-net.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ void fxgmac_free_rx_data(struct fxgmac_pdata *pdata)
static int fxgmac_disable_pci_msi_config(struct pci_dev *pdev)
{
u16 pcie_cap_offset;
u32 pcie_msi_mask_bits;
u32 pcie_msi_mask_bits = 0;
int ret = 0;

pcie_cap_offset = pci_find_capability(pdev, PCI_CAP_ID_MSI);
Expand Down Expand Up @@ -1007,7 +1007,7 @@ static int fxgmac_disable_pci_msi_config(struct pci_dev *pdev)
static int fxgmac_disable_pci_msix_config(struct pci_dev *pdev)
{
u16 pcie_cap_offset;
u32 pcie_msi_mask_bits;
u32 pcie_msi_mask_bits = 0;
int ret = 0;

pcie_cap_offset = pci_find_capability(pdev, PCI_CAP_ID_MSIX);
Expand Down
Loading