Skip to content

Commit 71486e4

Browse files
houlz0507superm1
authored andcommitted
accel/amdxdna: Declare npu device profile as static variables
Declare the variables as static to fix the sparse warnings: symbol 'npu5_dev_priv' was not declared. Should it be static? symbol 'npu1_dev_priv' was not declared. Should it be static? symbol 'npu4_dev_priv' was not declared. Should it be static? symbol 'npu2_dev_priv' was not declared. Should it be static? Fixes: 8c9ff1b ("accel/amdxdna: Add a new driver for AMD AI Engine") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Lizhi Hou <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 041d61a commit 71486e4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

drivers/accel/amdxdna/npu1_regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const struct dpm_clk_freq npu1_dpm_clk_table[] = {
6262
{ 0 }
6363
};
6464

65-
const struct amdxdna_dev_priv npu1_dev_priv = {
65+
static const struct amdxdna_dev_priv npu1_dev_priv = {
6666
.fw_path = "amdnpu/1502_00/npu.sbin",
6767
.protocol_major = 0x5,
6868
.protocol_minor = 0x7,

drivers/accel/amdxdna/npu2_regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#define NPU2_SMU_BAR_BASE MMNPU_APERTURE4_BASE
6262
#define NPU2_SRAM_BAR_BASE MMNPU_APERTURE1_BASE
6363

64-
const struct amdxdna_dev_priv npu2_dev_priv = {
64+
static const struct amdxdna_dev_priv npu2_dev_priv = {
6565
.fw_path = "amdnpu/17f0_00/npu.sbin",
6666
.protocol_major = 0x6,
6767
.protocol_minor = 0x6,

drivers/accel/amdxdna/npu4_regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const struct dpm_clk_freq npu4_dpm_clk_table[] = {
8282
{ 0 }
8383
};
8484

85-
const struct amdxdna_dev_priv npu4_dev_priv = {
85+
static const struct amdxdna_dev_priv npu4_dev_priv = {
8686
.fw_path = "amdnpu/17f0_10/npu.sbin",
8787
.protocol_major = 0x6,
8888
.protocol_minor = 12,

drivers/accel/amdxdna/npu5_regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#define NPU5_SMU_BAR_BASE MMNPU_APERTURE4_BASE
6262
#define NPU5_SRAM_BAR_BASE MMNPU_APERTURE1_BASE
6363

64-
const struct amdxdna_dev_priv npu5_dev_priv = {
64+
static const struct amdxdna_dev_priv npu5_dev_priv = {
6565
.fw_path = "amdnpu/17f0_11/npu.sbin",
6666
.protocol_major = 0x6,
6767
.protocol_minor = 12,

0 commit comments

Comments
 (0)