Skip to content

Commit

Permalink
Merge branch 'pds_core-fix-irq-index-bug-and-compiler-warnings'
Browse files Browse the repository at this point in the history
Shannon Nelson says:

====================
pds_core: fix irq index bug and compiler warnings

The first patch fixes a bug in our interrupt masking where we used the
wrong index.  The second patch addresses a couple of kernel test robot
string truncation warnings.
====================

Link: https://lore.kernel.org/r/20231113183257.71110-1-shannon.nelson@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
kuba-moo committed Nov 15, 2023
2 parents 17dd5ef + 7c02f6a commit 9d350b2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/pds_core/adminq.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ irqreturn_t pdsc_adminq_isr(int irq, void *data)
}

queue_work(pdsc->wq, &qcq->work);
pds_core_intr_mask(&pdsc->intr_ctrl[irq], PDS_CORE_INTR_MASK_CLEAR);
pds_core_intr_mask(&pdsc->intr_ctrl[qcq->intx], PDS_CORE_INTR_MASK_CLEAR);

return IRQ_HANDLED;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/pds_core/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define PDSC_DRV_DESCRIPTION "AMD/Pensando Core Driver"

#define PDSC_WATCHDOG_SECS 5
#define PDSC_QUEUE_NAME_MAX_SZ 32
#define PDSC_QUEUE_NAME_MAX_SZ 16
#define PDSC_ADMINQ_MIN_LENGTH 16 /* must be a power of two */
#define PDSC_NOTIFYQ_LENGTH 64 /* must be a power of two */
#define PDSC_TEARDOWN_RECOVERY false
Expand Down
8 changes: 6 additions & 2 deletions drivers/net/ethernet/amd/pds_core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,14 @@ static int pdsc_identify(struct pdsc *pdsc)
struct pds_core_drv_identity drv = {};
size_t sz;
int err;
int n;

drv.drv_type = cpu_to_le32(PDS_DRIVER_LINUX);
snprintf(drv.driver_ver_str, sizeof(drv.driver_ver_str),
"%s %s", PDS_CORE_DRV_NAME, utsname()->release);
/* Catching the return quiets a Wformat-truncation complaint */
n = snprintf(drv.driver_ver_str, sizeof(drv.driver_ver_str),
"%s %s", PDS_CORE_DRV_NAME, utsname()->release);
if (n > sizeof(drv.driver_ver_str))
dev_dbg(pdsc->dev, "release name truncated, don't care\n");

/* Next let's get some info about the device
* We use the devcmd_lock at this level in order to
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amd/pds_core/devlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ int pdsc_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
struct pds_core_fw_list_info fw_list;
struct pdsc *pdsc = devlink_priv(dl);
union pds_core_dev_comp comp;
char buf[16];
char buf[32];
int listlen;
int err;
int i;
Expand Down

0 comments on commit 9d350b2

Please sign in to comment.