Skip to content
3 changes: 2 additions & 1 deletion drivers/net/ethernet/linkdata/sxe/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ sxe-objs += $(patsubst %.c, base/trace/%.o, $(notdir $(wildcard $(CURDIR)/base/t
sxe-objs += $(patsubst %.c, base/log/%.o, $(notdir $(wildcard $(CURDIR)/base/log/*.c)))

#添加编译选项和编译宏
ccflags-y += -Werror -Wmaybe-uninitialized -frecord-gcc-switches
ccflags-y += -Werror -frecord-gcc-switches
ccflags-y += $(call cc-option, -Wmaybe-uninitialized)
ccflags-y += -I$(CURDIR)/sxepf
ccflags-y += -I$(CURDIR)/include/sxe
ccflags-y += -I$(CURDIR)/include
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/linkdata/sxe/sxepf/sxe_host_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ STATIC void sxe_pci_addr_get(struct pci_dev *pci_dev,
return;
}

s32 sxe_cli_cdev_register()
s32 sxe_cli_cdev_register(void)
{
s32 ret;

Expand Down Expand Up @@ -212,7 +212,7 @@ s32 sxe_cli_cdev_register()

}

void sxe_cli_cdev_unregister()
void sxe_cli_cdev_unregister(void)
{
class_destroy (sxe_cdev_class);
unregister_chrdev_region(sxe_cdev_major, SXE_MAX_DEVICES_NUM);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/linkdata/sxe/sxepf/sxe_host_hdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void sxe_time_sync_handler(struct work_struct *work)
return;
}

struct semaphore *sxe_hdc_sema_get()
struct semaphore *sxe_hdc_sema_get(void)
{
return &g_hdc_sema;
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ethernet/linkdata/sxevf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ sxevf-objs += $(patsubst %.c, base/trace/%.o, $(notdir $(wildcard $(CURDIR)/base
sxevf-objs += $(patsubst %.c, base/log/%.o, $(notdir $(wildcard $(CURDIR)/base/log/*.c)))

#添加编译选项和编译宏
ccflags-y += -Werror -Wmaybe-uninitialized -frecord-gcc-switches
ccflags-y += -Werror -frecord-gcc-switches
ccflags-y += $(call cc-option, -Wmaybe-uninitialized)
ccflags-y += -I$(CURDIR)/sxevf
ccflags-y += -I$(CURDIR)/include/sxe
ccflags-y += -I$(CURDIR)/include
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ STATIC s32 sxevf_mailbox_lock(struct sxevf_hw *hw)
mailbox |= SXE_VFMAILBOX_VFU;
hw->mbx.ops->mailbox_write(hw, mailbox);

if (sxevf_mbx_reg_read(hw) && SXE_VFMAILBOX_VFU) {
if (sxevf_mbx_reg_read(hw) & SXE_VFMAILBOX_VFU) {
ret = 0;
break;
}
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ void sxevf_ring_num_set(struct sxevf_adapter *adapter)
adapter->tx_ring_ctxt.num = rss;
adapter->rx_ring_ctxt.num = rss;
adapter->xdp_ring_ctxt.num = adapter->xdp_prog ? rss : 0;
fallthrough;
default:
break;
}
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_rx_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static inline int xdp_rxq_info_reg_compat(struct xdp_rxq_info *xdp_rxq,

static s32 sxevf_rx_ring_alloc(struct sxevf_ring *ring)
{
s32 ret;
s32 ret = 0;
u32 size;
union sxevf_rx_data_desc *desc;
struct sxevf_adapter *adapter = netdev_priv(ring->netdev);
Expand Down Expand Up @@ -72,13 +72,14 @@ static s32 sxevf_rx_ring_alloc(struct sxevf_ring *ring)
#ifndef HAVE_NO_XDP_BUFF_RXQ
if (xdp_rxq_info_reg(&ring->xdp_rxq, adapter->netdev, ring->idx, 0) < 0) {
LOG_ERROR_BDF("ring[%u] xdp rxq info reg failed\n",ring->idx);
ret = -ENOMEM;
goto l_xdp_rxq_reg_failed;
}
#endif

ring->xdp_prog = adapter->xdp_prog;

return 0;
return ret;

#ifndef HAVE_NO_XDP_BUFF_RXQ
l_xdp_rxq_reg_failed:
Expand Down
5 changes: 3 additions & 2 deletions drivers/scsi/linkdata/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
EXTRA_CFLAGS += -DPS3_CFG_RELEASE
EXTRA_CFLAGS += -DPS3_HARDWARE_ASIC
EXTRA_CFLAGS += -DPS3_MODEL_V200
EXTRA_CFLAGS += -mno-outline-atomics

obj-$(CONFIG_SCSI_LINKDATA_PS3STOR) += ps3stor.o

Expand All @@ -14,12 +13,14 @@ ps3stor-objs := ps3_cmd_channel.o ps3_device_update.o ps3_ioc_manager.o ps3_mgr_
ps3_device_manager_sas.o ps3_ioc_adp.o ps3_load.o ps3_pci.o ps3_sas_transport.o ps3_watchdog.o
ps3stor-objs += linux/ps3_base.o linux/ps3_cli.o linux/ps3_cli_debug.o linux/ps3_driver_log.o linux/ps3_dump.o linux/ps3_pcie_err_handle.o

ccflags-y += -Werror -Wmaybe-uninitialized -frecord-gcc-switches
ccflags-y += -Werror -frecord-gcc-switches
ccflags-y += $(call cc-option, -Wmaybe-uninitialized)
ccflags-y += -I$(srctree) \
-I$(srctree)/drivers/scsi/linkdata \
-I$(srctree)/drivers/scsi/linkdata/linux \
-I$(srctree)/drivers/scsi/linkdata/include \
-I$(srctree)/drivers/scsi/linkdata/include/htp_v200
ccflags-y += $(call cc-option, -mno-outline-atomics)

clean:
@rm -rf *.o *.d *.ko Module.* modules.* *.mod.* .*.d .*.cmd .tmp_versions *.o.ur-safe
Expand Down
14 changes: 0 additions & 14 deletions drivers/scsi/linkdata/linux/ps3_cli_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -3606,8 +3606,6 @@ static void ps3_cli_err_inject_active(int argc, char *argv[])
}
static void ps3_cli_err_inject_clear(int argc, char *argv[])
{
argc = argc;
argv = argv;
INJECT_EXIT()
}

Expand Down Expand Up @@ -4092,8 +4090,6 @@ void ps3_show_inject_all_scsi_rw(int argc, char *argv[])
struct inject_cmds_t *pitem = NULL;
PS3Inject_s *p_inject_list = get_inject();

argc = argc;
argv = argv;
ps3_mutex_lock(&p_inject_list->lock);
if (list_empty(&p_inject_list->scsi_rw_list)) {
ps3stor_cli_printf("rw inject list is empty!\n");
Expand Down Expand Up @@ -4168,8 +4164,6 @@ void ps3_show_inject_all_scsi_task(int argc, char *argv[])
struct inject_cmds_t *pitem = NULL;
PS3Inject_s *p_inject_list = get_inject();

argc = argc;
argv = argv;
ps3_mutex_lock(&p_inject_list->lock);
if (list_empty(&p_inject_list->scsi_task_list)) {
ps3stor_cli_printf("task inject list is empty!\n");
Expand All @@ -4194,8 +4188,6 @@ void ps3_show_inject_all_mgr(int argc, char *argv[])
struct inject_cmds_t *pitem = NULL;
PS3Inject_s *p_inject_list = get_inject();

argc = argc;
argv = argv;
ps3_mutex_lock(&p_inject_list->lock);
if (list_empty(&p_inject_list->mgr_list)) {
goto l_out;
Expand Down Expand Up @@ -5076,9 +5068,6 @@ static void ps3_clear_inject_mgr(int argc, char *argv[])

static void ps3_clear_all_inject(int argc, char *argv[])
{
argc = argc;
argv = argv;

ps3_clear_all_inject_scsi_rw();
ps3_clear_all_inject_scsi_task();
ps3_clear_all_inject_mgr();
Expand Down Expand Up @@ -5421,9 +5410,6 @@ void ps3_scsi_rw_cmd_clear_all(void)

static void ps3_clear_hit_cmd(int argc, char *argv[])
{
argc = argc;
argv = argv;

ps3_scsi_rw_cmd_clear_all();
ps3_scsi_task_cmd_clear_all();
ps3_mgr_cmd_clear_all();
Expand Down
1 change: 0 additions & 1 deletion drivers/scsi/linkdata/ps3_device_manager_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ static S32 ps3_sas_node_phy_add(struct ps3_instance *instance,
void ps3_sas_node_phy_update(struct ps3_instance *instance, struct ps3_sas_phy *ps3_phy,
struct PS3PhyInfo *phy_info)
{
instance = instance;
ps3_phy->identify.initiator_port_protocols =
phy_info->initiatorPortProtocol;
ps3_phy->identify.target_port_protocols =
Expand Down
1 change: 1 addition & 0 deletions drivers/scsi/linkdata/ps3_mgr_cmd_err.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ static S32 ps3_err_fault_strategy_exec(struct ps3_instance *instance,
case PS3_FAULT_STRATEGY_RETRY:
ps3_msleep(PS3_ERR_MGR_CMD_DELAY_TIME_BEFORE_RERTY);
proc_result = -PS3_RETRY;
break;
default:
break;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/linkdata/ps3_sas_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ void ps3_sas_smp_handler(struct bsg_job *job, struct Scsi_Host *shost,
}
#endif

S32 ps3_sas_attach_transport()
S32 ps3_sas_attach_transport(void)
{
S32 ret = PS3_SUCCESS;
static struct sas_function_template ps3_sas_transport_functions = {
Expand All @@ -834,7 +834,7 @@ S32 ps3_sas_attach_transport()
return ret;
}

void ps3_sas_release_transport()
void ps3_sas_release_transport(void)
{
if(ps3_sas_transport_template != NULL) {
sas_release_transport(ps3_sas_transport_template);
Expand Down
Loading