* [PATCH] mm/hmm: remove redundant variable align_end
@ 2017-10-17 14:38 Colin King
2017-10-17 16:31 ` Jerome Glisse
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-10-17 14:38 UTC (permalink / raw)
To: Jérôme Glisse, linux-mm; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable align_end is assigned a value but it is never read, so
the variable is redundant and can be removed. Cleans up the clang
warning: Value stored to 'align_end' is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
mm/hmm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/hmm.c b/mm/hmm.c
index a88a847bccba..ea19742a5d60 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -803,11 +803,10 @@ static RADIX_TREE(hmm_devmem_radix, GFP_KERNEL);
static void hmm_devmem_radix_release(struct resource *resource)
{
- resource_size_t key, align_start, align_size, align_end;
+ resource_size_t key, align_start, align_size;
align_start = resource->start & ~(PA_SECTION_SIZE - 1);
align_size = ALIGN(resource_size(resource), PA_SECTION_SIZE);
- align_end = align_start + align_size - 1;
mutex_lock(&hmm_devmem_lock);
for (key = resource->start;
--
2.14.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm/hmm: remove redundant variable align_end
2017-10-17 14:38 [PATCH] mm/hmm: remove redundant variable align_end Colin King
@ 2017-10-17 16:31 ` Jerome Glisse
0 siblings, 0 replies; 2+ messages in thread
From: Jerome Glisse @ 2017-10-17 16:31 UTC (permalink / raw)
To: Colin King; +Cc: linux-mm, kernel-janitors, linux-kernel
On Tue, Oct 17, 2017 at 03:38:37PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable align_end is assigned a value but it is never read, so
> the variable is redundant and can be removed. Cleans up the clang
> warning: Value stored to 'align_end' is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
> ---
> mm/hmm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mm/hmm.c b/mm/hmm.c
> index a88a847bccba..ea19742a5d60 100644
> --- a/mm/hmm.c
> +++ b/mm/hmm.c
> @@ -803,11 +803,10 @@ static RADIX_TREE(hmm_devmem_radix, GFP_KERNEL);
>
> static void hmm_devmem_radix_release(struct resource *resource)
> {
> - resource_size_t key, align_start, align_size, align_end;
> + resource_size_t key, align_start, align_size;
>
> align_start = resource->start & ~(PA_SECTION_SIZE - 1);
> align_size = ALIGN(resource_size(resource), PA_SECTION_SIZE);
> - align_end = align_start + align_size - 1;
>
> mutex_lock(&hmm_devmem_lock);
> for (key = resource->start;
> --
> 2.14.1
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-17 16:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17 14:38 [PATCH] mm/hmm: remove redundant variable align_end Colin King
2017-10-17 16:31 ` Jerome Glisse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).