Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1401441 > unrolled thread
| Started by | Stefano Stabellini <sstabellini@kernel.org> |
|---|---|
| First post | 2016-05-16 13:20 +0200 |
| Last post | 2016-05-26 12:20 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] xen: remove incorrect forward declaration Stefano Stabellini <sstabellini@kernel.org> - 2016-05-16 13:20 +0200
Re: [Xen-devel] [PATCH] xen: remove incorrect forward declaration Julien Grall <julien.grall@arm.com> - 2016-05-26 12:20 +0200
Re: [Xen-devel] [PATCH] xen: remove incorrect forward declaration Stefano Stabellini <sstabellini@kernel.org> - 2016-05-26 12:20 +0200
| From | Stefano Stabellini <sstabellini@kernel.org> |
|---|---|
| Date | 2016-05-16 13:20 +0200 |
| Subject | Re: [PATCH] xen: remove incorrect forward declaration |
| Message-ID | <rzoJ4-6ey-7@gated-at.bofh.it> |
On Wed, 11 May 2016, Arnd Bergmann wrote:
> A bugfix patch for the xen balloon driver introduced a forward
> declaration for a static function that is conditionally compiled,
> causing a warning if only the declaration but not the definition
> are there:
>
> drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
> static void release_memory_resource(struct resource *resource);
>
> This removes the declaration again and instead moves the function
> definition to the right place, before its first caller and inside
> of the #ifdef protecting both.
>
> The patch that introduced the warning is marked for stable
> backports, so if that gets applied to 4.4, so should this one.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE")
> Cc: stable@vger.kernel.org
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> drivers/xen/balloon.c | 28 +++++++++++++---------------
> 1 file changed, 13 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
> index d46839f51e73..e4db19e88ab1 100644
> --- a/drivers/xen/balloon.c
> +++ b/drivers/xen/balloon.c
> @@ -151,8 +151,6 @@ static DECLARE_WAIT_QUEUE_HEAD(balloon_wq);
> static void balloon_process(struct work_struct *work);
> static DECLARE_DELAYED_WORK(balloon_worker, balloon_process);
>
> -static void release_memory_resource(struct resource *resource);
> -
> /* When ballooning out (allocating memory to return to Xen) we don't really
> want the kernel to try too hard since that can trigger the oom killer. */
> #define GFP_BALLOON \
> @@ -248,6 +246,19 @@ static enum bp_state update_schedule(enum bp_state state)
> }
>
> #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
> +static void release_memory_resource(struct resource *resource)
> +{
> + if (!resource)
> + return;
> +
> + /*
> + * No need to reset region to identity mapped since we now
> + * know that no I/O can be in this region
> + */
> + release_resource(resource);
> + kfree(resource);
> +}
> +
> static struct resource *additional_memory_resource(phys_addr_t size)
> {
> struct resource *res;
> @@ -286,19 +297,6 @@ static struct resource *additional_memory_resource(phys_addr_t size)
> return res;
> }
>
> -static void release_memory_resource(struct resource *resource)
> -{
> - if (!resource)
> - return;
> -
> - /*
> - * No need to reset region to identity mapped since we now
> - * know that no I/O can be in this region
> - */
> - release_resource(resource);
> - kfree(resource);
> -}
> -
> static enum bp_state reserve_additional_memory(void)
> {
> long credit;
> --
> 2.7.0
>
[toc] | [next] | [standalone]
| From | Julien Grall <julien.grall@arm.com> |
|---|---|
| Date | 2016-05-26 12:20 +0200 |
| Subject | Re: [Xen-devel] [PATCH] xen: remove incorrect forward declaration |
| Message-ID | <rD0yt-5b1-3@gated-at.bofh.it> |
| In reply to | #1401441 |
Hi Stefano,
On 16/05/2016 12:11, Stefano Stabellini wrote:
> On Wed, 11 May 2016, Arnd Bergmann wrote:
>> A bugfix patch for the xen balloon driver introduced a forward
>> declaration for a static function that is conditionally compiled,
>> causing a warning if only the declaration but not the definition
>> are there:
>>
>> drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared 'static' but never defined [-Werror=unused-function]
>> static void release_memory_resource(struct resource *resource);
>>
>> This removes the declaration again and instead moves the function
>> definition to the right place, before its first caller and inside
>> of the #ifdef protecting both.
>>
>> The patch that introduced the warning is marked for stable
>> backports, so if that gets applied to 4.4, so should this one.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE")
>> Cc: stable@vger.kernel.org
>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
You have applied this patch to the branch for-linus-4.8 but not
for-linus-4.7. Is it intentional?
Regards,
--
Julien Grall
[toc] | [prev] | [next] | [standalone]
| From | Stefano Stabellini <sstabellini@kernel.org> |
|---|---|
| Date | 2016-05-26 12:20 +0200 |
| Subject | Re: [Xen-devel] [PATCH] xen: remove incorrect forward declaration |
| Message-ID | <rD0yt-5b1-15@gated-at.bofh.it> |
| In reply to | #1407498 |
On Thu, 26 May 2016, Julien Grall wrote:
> Hi Stefano,
>
> On 16/05/2016 12:11, Stefano Stabellini wrote:
> > On Wed, 11 May 2016, Arnd Bergmann wrote:
> > > A bugfix patch for the xen balloon driver introduced a forward
> > > declaration for a static function that is conditionally compiled,
> > > causing a warning if only the declaration but not the definition
> > > are there:
> > >
> > > drivers/xen/balloon.c:154:13: error: 'release_memory_resource' declared
> > > 'static' but never defined [-Werror=unused-function]
> > > static void release_memory_resource(struct resource *resource);
> > >
> > > This removes the declaration again and instead moves the function
> > > definition to the right place, before its first caller and inside
> > > of the #ifdef protecting both.
> > >
> > > The patch that introduced the warning is marked for stable
> > > backports, so if that gets applied to 4.4, so should this one.
> > >
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > Fixes: dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit
> > > PAE")
> > > Cc: stable@vger.kernel.org
> >
> > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
>
> You have applied this patch to the branch for-linus-4.8 but not for-linus-4.7.
> Is it intentional?
Yes it is. for-linus-4.7 is based on an older version of the kernel that
doesn't have dfd74a1edfab. Linus discourages rebasing the pull request
branches. That said, the patch could still go to Linus earlies in one of
the RCs.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web