* [PATCH] sgi-xp: remove redundant pointers ch and rp
@ 2018-07-03 7:23 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2018-07-03 7:23 UTC (permalink / raw)
To: Cliff Whickman, Robin Holt, Arnd Bergmann, Greg Kroah-Hartman
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The pointers ch and rp are set but are never used hence they are
redundant and can be removed.
Cleans up clang warnings:
warning: variable 'ch' set but not used [-Wunused-but-set-variable]
warning: variable 'rp' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/misc/sgi-xp/xpc_channel.c | 3 ---
drivers/misc/sgi-xp/xpc_partition.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/drivers/misc/sgi-xp/xpc_channel.c b/drivers/misc/sgi-xp/xpc_channel.c
index 128d5615c804..05a890ce2ab8 100644
--- a/drivers/misc/sgi-xp/xpc_channel.c
+++ b/drivers/misc/sgi-xp/xpc_channel.c
@@ -656,7 +656,6 @@ xpc_initiate_connect(int ch_number)
{
short partid;
struct xpc_partition *part;
- struct xpc_channel *ch;
DBUG_ON(ch_number < 0 || ch_number >= XPC_MAX_NCHANNELS);
@@ -664,8 +663,6 @@ xpc_initiate_connect(int ch_number)
part = &xpc_partitions[partid];
if (xpc_part_ref(part)) {
- ch = &part->channels[ch_number];
-
/*
* Initiate the establishment of a connection on the
* newly registered channel to the remote partition.
diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp/xpc_partition.c
index 7284413dabfd..4e59b01ad7eb 100644
--- a/drivers/misc/sgi-xp/xpc_partition.c
+++ b/drivers/misc/sgi-xp/xpc_partition.c
@@ -415,7 +415,6 @@ xpc_discovery(void)
int region_size;
int max_regions;
int nasid;
- struct xpc_rsvd_page *rp;
unsigned long *discovered_nasids;
enum xp_retval ret;
@@ -432,8 +431,6 @@ xpc_discovery(void)
return;
}
- rp = (struct xpc_rsvd_page *)xpc_rsvd_page;
-
/*
* The term 'region' in this context refers to the minimum number of
* nodes that can comprise an access protection grouping. The access
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] sgi-xp: remove redundant pointers ch and rp
@ 2018-07-03 7:23 ` Colin King
0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2018-07-03 7:23 UTC (permalink / raw)
To: Cliff Whickman, Robin Holt, Arnd Bergmann, Greg Kroah-Hartman
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The pointers ch and rp are set but are never used hence they are
redundant and can be removed.
Cleans up clang warnings:
warning: variable 'ch' set but not used [-Wunused-but-set-variable]
warning: variable 'rp' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/misc/sgi-xp/xpc_channel.c | 3 ---
drivers/misc/sgi-xp/xpc_partition.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/drivers/misc/sgi-xp/xpc_channel.c b/drivers/misc/sgi-xp/xpc_channel.c
index 128d5615c804..05a890ce2ab8 100644
--- a/drivers/misc/sgi-xp/xpc_channel.c
+++ b/drivers/misc/sgi-xp/xpc_channel.c
@@ -656,7 +656,6 @@ xpc_initiate_connect(int ch_number)
{
short partid;
struct xpc_partition *part;
- struct xpc_channel *ch;
DBUG_ON(ch_number < 0 || ch_number >= XPC_MAX_NCHANNELS);
@@ -664,8 +663,6 @@ xpc_initiate_connect(int ch_number)
part = &xpc_partitions[partid];
if (xpc_part_ref(part)) {
- ch = &part->channels[ch_number];
-
/*
* Initiate the establishment of a connection on the
* newly registered channel to the remote partition.
diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp/xpc_partition.c
index 7284413dabfd..4e59b01ad7eb 100644
--- a/drivers/misc/sgi-xp/xpc_partition.c
+++ b/drivers/misc/sgi-xp/xpc_partition.c
@@ -415,7 +415,6 @@ xpc_discovery(void)
int region_size;
int max_regions;
int nasid;
- struct xpc_rsvd_page *rp;
unsigned long *discovered_nasids;
enum xp_retval ret;
@@ -432,8 +431,6 @@ xpc_discovery(void)
return;
}
- rp = (struct xpc_rsvd_page *)xpc_rsvd_page;
-
/*
* The term 'region' in this context refers to the minimum number of
* nodes that can comprise an access protection grouping. The access
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] sgi-xp: remove redundant pointers ch and rp
2018-07-03 7:23 ` Colin King
@ 2018-07-03 19:32 ` Arnd Bergmann
-1 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2018-07-03 19:32 UTC (permalink / raw)
To: Colin King
Cc: Cliff Whickman, Robin Holt, Greg Kroah-Hartman, kernel-janitors,
Linux Kernel Mailing List
On Tue, Jul 3, 2018 at 9:23 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointers ch and rp are set but are never used hence they are
> redundant and can be removed.
>
> Cleans up clang warnings:
> warning: variable 'ch' set but not used [-Wunused-but-set-variable]
> warning: variable 'rp' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/misc/sgi-xp/xpc_channel.c | 3 ---
> drivers/misc/sgi-xp/xpc_partition.c | 3 ---
> 2 files changed, 6 deletions(-)
>
> diff --git a/drivers/misc/sgi-xp/xpc_channel.c b/drivers/misc/sgi-xp/xpc_channel.c
> index 128d5615c804..05a890ce2ab8 100644
> --- a/drivers/misc/sgi-xp/xpc_channel.c
> +++ b/drivers/misc/sgi-xp/xpc_channel.c
> @@ -656,7 +656,6 @@ xpc_initiate_connect(int ch_number)
> {
> short partid;
> struct xpc_partition *part;
> - struct xpc_channel *ch;
>
> DBUG_ON(ch_number < 0 || ch_number >= XPC_MAX_NCHANNELS);
>
> @@ -664,8 +663,6 @@ xpc_initiate_connect(int ch_number)
> part = &xpc_partitions[partid];
>
> if (xpc_part_ref(part)) {
> - ch = &part->channels[ch_number];
> -
> /*
> * Initiate the establishment of a connection on the
> * newly registered channel to the remote partition.
This was left behind in 2005 when the last use of that variable
got removed in commit e54af724c1ae ("[IA64-SGI] fixes for XPC
disengage and open/close protocol")
> diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp/xpc_partition.c
> index 7284413dabfd..4e59b01ad7eb 100644
> --- a/drivers/misc/sgi-xp/xpc_partition.c
> +++ b/drivers/misc/sgi-xp/xpc_partition.c
> @@ -415,7 +415,6 @@ xpc_discovery(void)
> int region_size;
> int max_regions;
> int nasid;
> - struct xpc_rsvd_page *rp;
> unsigned long *discovered_nasids;
> enum xp_retval ret;
>
> @@ -432,8 +431,6 @@ xpc_discovery(void)
> return;
> }
>
> - rp = (struct xpc_rsvd_page *)xpc_rsvd_page;
> -
And this one in
4b38fcd48582 ("[IA64-SGI] XPC changes to support more than 2k nasids")
Both changes look correct to me,
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sgi-xp: remove redundant pointers ch and rp
@ 2018-07-03 19:32 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2018-07-03 19:32 UTC (permalink / raw)
To: Colin King
Cc: Cliff Whickman, Robin Holt, Greg Kroah-Hartman, kernel-janitors,
Linux Kernel Mailing List
On Tue, Jul 3, 2018 at 9:23 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointers ch and rp are set but are never used hence they are
> redundant and can be removed.
>
> Cleans up clang warnings:
> warning: variable 'ch' set but not used [-Wunused-but-set-variable]
> warning: variable 'rp' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/misc/sgi-xp/xpc_channel.c | 3 ---
> drivers/misc/sgi-xp/xpc_partition.c | 3 ---
> 2 files changed, 6 deletions(-)
>
> diff --git a/drivers/misc/sgi-xp/xpc_channel.c b/drivers/misc/sgi-xp/xpc_channel.c
> index 128d5615c804..05a890ce2ab8 100644
> --- a/drivers/misc/sgi-xp/xpc_channel.c
> +++ b/drivers/misc/sgi-xp/xpc_channel.c
> @@ -656,7 +656,6 @@ xpc_initiate_connect(int ch_number)
> {
> short partid;
> struct xpc_partition *part;
> - struct xpc_channel *ch;
>
> DBUG_ON(ch_number < 0 || ch_number >= XPC_MAX_NCHANNELS);
>
> @@ -664,8 +663,6 @@ xpc_initiate_connect(int ch_number)
> part = &xpc_partitions[partid];
>
> if (xpc_part_ref(part)) {
> - ch = &part->channels[ch_number];
> -
> /*
> * Initiate the establishment of a connection on the
> * newly registered channel to the remote partition.
This was left behind in 2005 when the last use of that variable
got removed in commit e54af724c1ae ("[IA64-SGI] fixes for XPC
disengage and open/close protocol")
> diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp/xpc_partition.c
> index 7284413dabfd..4e59b01ad7eb 100644
> --- a/drivers/misc/sgi-xp/xpc_partition.c
> +++ b/drivers/misc/sgi-xp/xpc_partition.c
> @@ -415,7 +415,6 @@ xpc_discovery(void)
> int region_size;
> int max_regions;
> int nasid;
> - struct xpc_rsvd_page *rp;
> unsigned long *discovered_nasids;
> enum xp_retval ret;
>
> @@ -432,8 +431,6 @@ xpc_discovery(void)
> return;
> }
>
> - rp = (struct xpc_rsvd_page *)xpc_rsvd_page;
> -
And this one in
4b38fcd48582 ("[IA64-SGI] XPC changes to support more than 2k nasids")
Both changes look correct to me,
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sgi-xp: remove redundant pointers ch and rp
2018-07-03 7:23 ` Colin King
@ 2018-07-05 16:23 ` Robin Holt
-1 siblings, 0 replies; 6+ messages in thread
From: Robin Holt @ 2018-07-05 16:23 UTC (permalink / raw)
To: colin.king
Cc: Cliff Whickman, Arnd Bergmann, Greg Kroah-Hartman, kernel-janitors, LKML
On Tue, Jul 3, 2018 at 2:23 AM Colin King <colin.king@canonical.com> wrote:
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Robin Holt <robinmholt@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sgi-xp: remove redundant pointers ch and rp
@ 2018-07-05 16:23 ` Robin Holt
0 siblings, 0 replies; 6+ messages in thread
From: Robin Holt @ 2018-07-05 16:23 UTC (permalink / raw)
To: colin.king
Cc: Cliff Whickman, Arnd Bergmann, Greg Kroah-Hartman, kernel-janitors, LKML
On Tue, Jul 3, 2018 at 2:23 AM Colin King <colin.king@canonical.com> wrote:
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Robin Holt <robinmholt@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-07-05 16:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-03 7:23 [PATCH] sgi-xp: remove redundant pointers ch and rp Colin King
2018-07-03 7:23 ` Colin King
2018-07-03 19:32 ` Arnd Bergmann
2018-07-03 19:32 ` Arnd Bergmann
2018-07-05 16:23 ` Robin Holt
2018-07-05 16:23 ` Robin Holt
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.