Skip to content

Commit 9d350b2

Browse files
committed
Merge branch 'pds_core-fix-irq-index-bug-and-compiler-warnings'
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>
2 parents 17dd5ef + 7c02f6a commit 9d350b2

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

drivers/net/ethernet/amd/pds_core/adminq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ irqreturn_t pdsc_adminq_isr(int irq, void *data)
146146
}
147147

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

151151
return IRQ_HANDLED;
152152
}

drivers/net/ethernet/amd/pds_core/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define PDSC_DRV_DESCRIPTION "AMD/Pensando Core Driver"
1616

1717
#define PDSC_WATCHDOG_SECS 5
18-
#define PDSC_QUEUE_NAME_MAX_SZ 32
18+
#define PDSC_QUEUE_NAME_MAX_SZ 16
1919
#define PDSC_ADMINQ_MIN_LENGTH 16 /* must be a power of two */
2020
#define PDSC_NOTIFYQ_LENGTH 64 /* must be a power of two */
2121
#define PDSC_TEARDOWN_RECOVERY false

drivers/net/ethernet/amd/pds_core/dev.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,14 @@ static int pdsc_identify(struct pdsc *pdsc)
261261
struct pds_core_drv_identity drv = {};
262262
size_t sz;
263263
int err;
264+
int n;
264265

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

269273
/* Next let's get some info about the device
270274
* We use the devcmd_lock at this level in order to

drivers/net/ethernet/amd/pds_core/devlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ int pdsc_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
104104
struct pds_core_fw_list_info fw_list;
105105
struct pdsc *pdsc = devlink_priv(dl);
106106
union pds_core_dev_comp comp;
107-
char buf[16];
107+
char buf[32];
108108
int listlen;
109109
int err;
110110
int i;

0 commit comments

Comments
 (0)