All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH dev-5.0 v2 3/3] drivers/misc: Add Aspeed P2A control driver
@ 2019-04-25 20:52 Patrick Venture
  2019-04-25 21:01 ` Patrick Venture
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Venture @ 2019-04-25 20:52 UTC (permalink / raw)
  To: venture, joel, andrew; +Cc: openbmc

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>
(cherry picked from commit 2d1c31cb642b44e3d621643b8d30e15e5e4df4e4)
---
v2:
 - First instance of this patchset on the chain, no changes.
---
 drivers/misc/aspeed-p2a-ctrl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/misc/aspeed-p2a-ctrl.c b/drivers/misc/aspeed-p2a-ctrl.c
index c0521b2ffc6a..9736821972ef 100644
--- a/drivers/misc/aspeed-p2a-ctrl.c
+++ b/drivers/misc/aspeed-p2a-ctrl.c
@@ -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)
 {
+	unsigned long vsize;
 	struct aspeed_p2a_user *priv = file->private_data;
 	struct aspeed_p2a_ctrl *ctrl = priv->parent;
 
 	if (ctrl->mem_base == 0 && ctrl->mem_size == 0)
 		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;
 
 	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)
 {
 	int i;
-	u32 value;
 	u32 bits = 0;
 	bool open_regions = false;
 	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 device *dev;
-	struct resource *res, resm;
+	struct resource resm;
 	struct device_node *node;
 	int rc = 0;
 
-- 
2.21.0.593.g511ec345e18-goog

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH dev-5.0 v2 3/3] drivers/misc: Add Aspeed P2A control driver
  2019-04-25 20:52 [PATCH dev-5.0 v2 3/3] drivers/misc: Add Aspeed P2A control driver Patrick Venture
@ 2019-04-25 21:01 ` Patrick Venture
  2019-04-25 21:03   ` Patrick Venture
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Venture @ 2019-04-25 21:01 UTC (permalink / raw)
  To: Patrick Venture, Joel Stanley, Andrew Jeffery; +Cc: OpenBMC Maillist

On Thu, Apr 25, 2019 at 1:52 PM Patrick Venture <venture@google.com> wrote:
>
> 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>
> (cherry picked from commit 2d1c31cb642b44e3d621643b8d30e15e5e4df4e4)
> ---
> v2:
>  - First instance of this patchset on the chain, no changes.
> ---
>  drivers/misc/aspeed-p2a-ctrl.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/misc/aspeed-p2a-ctrl.c b/drivers/misc/aspeed-p2a-ctrl.c
> index c0521b2ffc6a..9736821972ef 100644
> --- a/drivers/misc/aspeed-p2a-ctrl.c
> +++ b/drivers/misc/aspeed-p2a-ctrl.c
> @@ -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)
>  {
> +       unsigned long vsize;
>         struct aspeed_p2a_user *priv = file->private_data;
>         struct aspeed_p2a_ctrl *ctrl = priv->parent;
>
>         if (ctrl->mem_base == 0 && ctrl->mem_size == 0)
>                 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;
>
>         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)
>  {
>         int i;
> -       u32 value;
>         u32 bits = 0;
>         bool open_regions = false;
>         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 device *dev;
> -       struct resource *res, resm;
> +       struct resource resm;
>         struct device_node *node;
>         int rc = 0;
>
> --
> 2.21.0.593.g511ec345e18-goog
>

I had submitted this as a fixup! patchset upstream, and it was applied
as such and so yeah, it's squashed.  Let me try v3 and it'll be back
to the two patches but with fixed up notes.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH dev-5.0 v2 3/3] drivers/misc: Add Aspeed P2A control driver
  2019-04-25 21:01 ` Patrick Venture
@ 2019-04-25 21:03   ` Patrick Venture
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick Venture @ 2019-04-25 21:03 UTC (permalink / raw)
  To: Patrick Venture, Joel Stanley, Andrew Jeffery; +Cc: OpenBMC Maillist

On Thu, Apr 25, 2019 at 2:01 PM Patrick Venture <venture@google.com> wrote:
>
> On Thu, Apr 25, 2019 at 1:52 PM Patrick Venture <venture@google.com> wrote:
> >
> > 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>
> > (cherry picked from commit 2d1c31cb642b44e3d621643b8d30e15e5e4df4e4)
> > ---
> > v2:
> >  - First instance of this patchset on the chain, no changes.
> > ---
> >  drivers/misc/aspeed-p2a-ctrl.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/misc/aspeed-p2a-ctrl.c b/drivers/misc/aspeed-p2a-ctrl.c
> > index c0521b2ffc6a..9736821972ef 100644
> > --- a/drivers/misc/aspeed-p2a-ctrl.c
> > +++ b/drivers/misc/aspeed-p2a-ctrl.c
> > @@ -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)
> >  {
> > +       unsigned long vsize;
> >         struct aspeed_p2a_user *priv = file->private_data;
> >         struct aspeed_p2a_ctrl *ctrl = priv->parent;
> >
> >         if (ctrl->mem_base == 0 && ctrl->mem_size == 0)
> >                 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;
> >
> >         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)
> >  {
> >         int i;
> > -       u32 value;
> >         u32 bits = 0;
> >         bool open_regions = false;
> >         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 device *dev;
> > -       struct resource *res, resm;
> > +       struct resource resm;
> >         struct device_node *node;
> >         int rc = 0;
> >
> > --
> > 2.21.0.593.g511ec345e18-goog
> >
>

strikethrough-start
> I had submitted this as a fixup! patchset upstream, and it was applied
> as such and so yeah, it's squashed.  Let me try v3 and it'll be back
> to the two patches but with fixed up notes.
strikethrough-end

Caffeine is starting to fail me.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-25 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-25 20:52 [PATCH dev-5.0 v2 3/3] drivers/misc: Add Aspeed P2A control driver Patrick Venture
2019-04-25 21:01 ` Patrick Venture
2019-04-25 21:03   ` Patrick Venture

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.