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

CID-300588, 307566, 307559 #8256

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ xocl_cu_ctx_to_info(struct xocl_dev *xdev, struct drm_xocl_open_cu_ctx *cu_args,
char kname[CU_NAME_MAX_LEN];
int i = 0;

strcpy(kname, strsep(&kname_p, ":"));
strcpy(iname, strsep(&kname_p, ":"));
strlcpy(kname, strsep(&kname_p, ":"), sizeof(kname);
strlcpy(iname, strsep(&kname_p, ":"), sizeof(iname);

/* Retrieve the CU index from the given slot */
for (i = 0; i < MAX_CUS; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ xocl_read_axlf_helper(struct xocl_drm *drm_p, struct drm_xocl_axlf *axlf_ptr,
struct axlf *axlf = NULL;
struct axlf bin_obj;
size_t size = 0;
uint32_t slot_id;
uint32_t slot_id = 0;
int preserve_mem = 0;
struct mem_topology *new_topology = NULL;
struct xocl_dev *xdev = drm_p->xdev;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static ssize_t xclbinuuid_show(struct device *dev,
if (!xclbin_id)
continue;

cnt += sprintf(buf + cnt, "%pUb\n", xclbin_id ? xclbin_id : 0);
cnt += sprintf(buf + cnt, "%pUb\n", xclbin_id);

XOCL_PUT_XCLBIN_ID(xdev, i);
xclbin_id = NULL;
Expand Down Expand Up @@ -112,7 +112,7 @@ static ssize_t kdsstat_show(struct device *dev,
continue;

size += sprintf(buf + size, "xclbin:\t\t\t%pUb\n",
xclbin_id ? xclbin_id : 0);
xclbin_id);

XOCL_PUT_XCLBIN_ID(xdev, i);
xclbin_id = NULL;
Expand Down
Loading