Unverified Commit dd2fa702 authored by Karen Xie's avatar Karen Xie Committed by GitHub

Merge pull request #80 from sasfermat/pr/fix-warnings

Fix warnings
parents 93ffc653 01f1dc87
...@@ -3074,7 +3074,7 @@ static int engine_init(struct xdma_engine *engine, struct xdma_dev *xdev, ...@@ -3074,7 +3074,7 @@ static int engine_init(struct xdma_engine *engine, struct xdma_dev *xdev,
/* remember SG DMA direction */ /* remember SG DMA direction */
engine->dir = dir; engine->dir = dir;
sprintf(engine->name, "%d-%s%d-%s", xdev->idx, snprintf(engine->name, sizeof(engine->name), "%d-%s%d-%s", xdev->idx,
(dir == DMA_TO_DEVICE) ? "H2C" : "C2H", channel, (dir == DMA_TO_DEVICE) ? "H2C" : "C2H", channel,
engine->streaming ? "ST" : "MM"); engine->streaming ? "ST" : "MM");
......
...@@ -475,7 +475,7 @@ struct xdma_request_cb { ...@@ -475,7 +475,7 @@ struct xdma_request_cb {
struct xdma_engine { struct xdma_engine {
unsigned long magic; /* structure ID for sanity checks */ unsigned long magic; /* structure ID for sanity checks */
struct xdma_dev *xdev; /* parent device */ struct xdma_dev *xdev; /* parent device */
char name[5]; /* name of this engine */ char name[16]; /* name of this engine */
int version; /* version of this engine */ int version; /* version of this engine */
//dev_t cdevno; /* character device major:minor */ //dev_t cdevno; /* character device major:minor */
//struct cdev cdev; /* character device (embedded struct) */ //struct cdev cdev; /* character device (embedded struct) */
......
...@@ -351,7 +351,7 @@ static struct pci_driver pci_driver = { ...@@ -351,7 +351,7 @@ static struct pci_driver pci_driver = {
.err_handler = &xdma_err_handler, .err_handler = &xdma_err_handler,
}; };
static int __init xdma_mod_init(void) static int xdma_mod_init(void)
{ {
int rv; int rv;
...@@ -369,7 +369,7 @@ static int __init xdma_mod_init(void) ...@@ -369,7 +369,7 @@ static int __init xdma_mod_init(void)
return pci_register_driver(&pci_driver); return pci_register_driver(&pci_driver);
} }
static void __exit xdma_mod_exit(void) static void xdma_mod_exit(void)
{ {
/* unregister this driver from the PCI bus driver */ /* unregister this driver from the PCI bus driver */
dbg_init("pci_unregister_driver.\n"); dbg_init("pci_unregister_driver.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment