mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
drivers/misc: Add Aspeed P2A control driver
Fixup compiler warnings: - 108 warning: ISO C90 forbids mixed declarations and code - 264 warning: unused variable 'value' - 335 warning: unused variable 'res' Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Patrick Venture <venture@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
06d5d6b7f9
commit
2d1c31cb64
1 changed files with 3 additions and 3 deletions
|
@ -99,13 +99,14 @@ static void aspeed_p2a_disable_bridge(struct aspeed_p2a_ctrl *p2a_ctrl)
|
||||||
|
|
||||||
static int aspeed_p2a_mmap(struct file *file, struct vm_area_struct *vma)
|
static int aspeed_p2a_mmap(struct file *file, struct vm_area_struct *vma)
|
||||||
{
|
{
|
||||||
|
unsigned long vsize;
|
||||||
struct aspeed_p2a_user *priv = file->private_data;
|
struct aspeed_p2a_user *priv = file->private_data;
|
||||||
struct aspeed_p2a_ctrl *ctrl = priv->parent;
|
struct aspeed_p2a_ctrl *ctrl = priv->parent;
|
||||||
|
|
||||||
if (ctrl->mem_base == 0 && ctrl->mem_size == 0)
|
if (ctrl->mem_base == 0 && ctrl->mem_size == 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
unsigned long vsize = vma->vm_end - vma->vm_start;
|
vsize = vma->vm_end - vma->vm_start;
|
||||||
pgprot_t prot = vma->vm_page_prot;
|
pgprot_t prot = vma->vm_page_prot;
|
||||||
|
|
||||||
if (vma->vm_pgoff + vsize > ctrl->mem_base + ctrl->mem_size)
|
if (vma->vm_pgoff + vsize > ctrl->mem_base + ctrl->mem_size)
|
||||||
|
@ -261,7 +262,6 @@ static int aspeed_p2a_open(struct inode *inode, struct file *file)
|
||||||
static int aspeed_p2a_release(struct inode *inode, struct file *file)
|
static int aspeed_p2a_release(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
u32 value;
|
|
||||||
u32 bits = 0;
|
u32 bits = 0;
|
||||||
bool open_regions = false;
|
bool open_regions = false;
|
||||||
struct aspeed_p2a_user *priv = file->private_data;
|
struct aspeed_p2a_user *priv = file->private_data;
|
||||||
|
@ -332,7 +332,7 @@ static int aspeed_p2a_ctrl_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct aspeed_p2a_ctrl *misc_ctrl;
|
struct aspeed_p2a_ctrl *misc_ctrl;
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
struct resource *res, resm;
|
struct resource resm;
|
||||||
struct device_node *node;
|
struct device_node *node;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue