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,
/* remember SG DMA direction */
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,
engine->streaming ? "ST" : "MM");
......
......@@ -475,7 +475,7 @@ struct xdma_request_cb {
struct xdma_engine {
unsigned long magic; /* structure ID for sanity checks */
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 */
//dev_t cdevno; /* character device major:minor */
//struct cdev cdev; /* character device (embedded struct) */
......
......@@ -351,7 +351,7 @@ static struct pci_driver pci_driver = {
.err_handler = &xdma_err_handler,
};
static int __init xdma_mod_init(void)
static int xdma_mod_init(void)
{
int rv;
......@@ -369,7 +369,7 @@ static int __init xdma_mod_init(void)
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 */
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