* [PATCH 0/3] Mop-up last remaining patches for Misc
@ 2020-07-08 12:57 Lee Jones
2020-07-08 12:57 ` [PATCH 1/3] misc: vmw_vmci_defs: Mark 'struct vmci_handle VMCI_ANON_SRC_HANDLE' as __maybe_unused Lee Jones
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: Lee Jones @ 2020-07-08 12:57 UTC (permalink / raw)
To: arnd, gregkh; +Cc: linux-kernel, Lee Jones
These required fix-ups or were waiting on review.
Lee Jones (3):
misc: vmw_vmci_defs: Mark 'struct vmci_handle VMCI_ANON_SRC_HANDLE' as
__maybe_unused
misc: eeprom: at24: Tell the compiler that ACPI functions may not be
used
misc: cxl: flash: Remove unused variable 'drc_index'
drivers/misc/cxl/flash.c | 4 ++--
drivers/misc/eeprom/at24.c | 2 +-
include/linux/vmw_vmci_defs.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/3] misc: vmw_vmci_defs: Mark 'struct vmci_handle VMCI_ANON_SRC_HANDLE' as __maybe_unused
2020-07-08 12:57 [PATCH 0/3] Mop-up last remaining patches for Misc Lee Jones
@ 2020-07-08 12:57 ` Lee Jones
2020-07-08 12:57 ` [PATCH 2/3] misc: eeprom: at24: Tell the compiler that ACPI functions may not be used Lee Jones
` (2 subsequent siblings)
3 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2020-07-08 12:57 UTC (permalink / raw)
To: arnd, gregkh; +Cc: linux-kernel, Lee Jones, George Zhang
vmw_vmci_defs.h is included by multiple source files. Some of which
do not make use of 'struct vmci_handle VMCI_ANON_SRC_HANDLE' rendering
it unused. Ensure the compiler knows that this is in fact intentional
by marking it as __maybe_unused. This fixes the following W=1 warnings:
In file included from drivers/misc/vmw_vmci/vmci_context.c:8:
include/linux/vmw_vmci_defs.h:162:33: warning: ‘VMCI_ANON_SRC_HANDLE’ defined but not used [-Wunused-const-variable=]
162 | static const struct vmci_handle VMCI_ANON_SRC_HANDLE = {
| ^~~~~~~~~~~~~~~~~~~~
In file included from drivers/misc/vmw_vmci/vmci_datagram.c:8:
include/linux/vmw_vmci_defs.h:162:33: warning: ‘VMCI_ANON_SRC_HANDLE’ defined but not used [-Wunused-const-variable=]
162 | static const struct vmci_handle VMCI_ANON_SRC_HANDLE = {
| ^~~~~~~~~~~~~~~~~~~~
Cc: George Zhang <georgezhang@vmware.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
include/linux/vmw_vmci_defs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/vmw_vmci_defs.h b/include/linux/vmw_vmci_defs.h
index fefb5292403bc..be0afe6f379ba 100644
--- a/include/linux/vmw_vmci_defs.h
+++ b/include/linux/vmw_vmci_defs.h
@@ -159,7 +159,7 @@ static inline bool vmci_handle_is_invalid(struct vmci_handle h)
*/
#define VMCI_ANON_SRC_CONTEXT_ID VMCI_INVALID_ID
#define VMCI_ANON_SRC_RESOURCE_ID VMCI_INVALID_ID
-static const struct vmci_handle VMCI_ANON_SRC_HANDLE = {
+static const struct vmci_handle __maybe_unused VMCI_ANON_SRC_HANDLE = {
.context = VMCI_ANON_SRC_CONTEXT_ID,
.resource = VMCI_ANON_SRC_RESOURCE_ID
};
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/3] misc: eeprom: at24: Tell the compiler that ACPI functions may not be used
2020-07-08 12:57 [PATCH 0/3] Mop-up last remaining patches for Misc Lee Jones
2020-07-08 12:57 ` [PATCH 1/3] misc: vmw_vmci_defs: Mark 'struct vmci_handle VMCI_ANON_SRC_HANDLE' as __maybe_unused Lee Jones
@ 2020-07-08 12:57 ` Lee Jones
2020-07-08 12:57 ` Lee Jones
2020-07-08 13:07 ` [PATCH 0/3] Mop-up last remaining patches for Misc Arnd Bergmann
3 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2020-07-08 12:57 UTC (permalink / raw)
To: arnd, gregkh; +Cc: linux-kernel, Lee Jones, Bartosz Golaszewski
... as is the case when !CONFIG_ACPI.
Fixes the following W=1 kernel build warning:
drivers/misc/eeprom/at24.c:228:36: warning: ‘at24_acpi_ids’ defined but not used [-Wunused-const-variable=]
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
drivers/misc/eeprom/at24.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 9ff18d4961ceb..2591c21b2b5d8 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -225,7 +225,7 @@ static const struct of_device_id at24_of_match[] = {
};
MODULE_DEVICE_TABLE(of, at24_of_match);
-static const struct acpi_device_id at24_acpi_ids[] = {
+static const struct acpi_device_id __maybe_unused at24_acpi_ids[] = {
{ "INT3499", (kernel_ulong_t)&at24_data_INT3499 },
{ "TPF0001", (kernel_ulong_t)&at24_data_24c1024 },
{ /* END OF LIST */ }
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/3] misc: cxl: flash: Remove unused variable 'drc_index'
2020-07-08 12:57 [PATCH 0/3] Mop-up last remaining patches for Misc Lee Jones
@ 2020-07-08 12:57 ` Lee Jones
2020-07-08 12:57 ` [PATCH 2/3] misc: eeprom: at24: Tell the compiler that ACPI functions may not be used Lee Jones
` (2 subsequent siblings)
3 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2020-07-08 12:57 UTC (permalink / raw)
To: arnd, gregkh
Cc: linux-kernel, Lee Jones, Frederic Barrat, Andrew Donnellan, linuxppc-dev
Keeping the pointer increment though.
Fixes the following W=1 kernel build warning:
drivers/misc/cxl/flash.c: In function ‘update_devicetree’:
drivers/misc/cxl/flash.c:178:16: warning: variable ‘drc_index’ set but not used [-Wunused-but-set-variable]
178 | __be32 *data, drc_index, phandle;
| ^~~~~~~~~
Cc: Frederic Barrat <fbarrat@linux.ibm.com>
Cc: Andrew Donnellan <ajd@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/misc/cxl/flash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/cxl/flash.c b/drivers/misc/cxl/flash.c
index cb9cca35a2263..774d582ddd70b 100644
--- a/drivers/misc/cxl/flash.c
+++ b/drivers/misc/cxl/flash.c
@@ -175,7 +175,7 @@ static int update_devicetree(struct cxl *adapter, s32 scope)
struct update_nodes_workarea *unwa;
u32 action, node_count;
int token, rc, i;
- __be32 *data, drc_index, phandle;
+ __be32 *data, phandle;
char *buf;
token = rtas_token("ibm,update-nodes");
@@ -213,7 +213,7 @@ static int update_devicetree(struct cxl *adapter, s32 scope)
break;
case OPCODE_ADD:
/* nothing to do, just move pointer */
- drc_index = *data++;
+ *data++;
break;
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/3] misc: cxl: flash: Remove unused variable 'drc_index'
@ 2020-07-08 12:57 ` Lee Jones
0 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2020-07-08 12:57 UTC (permalink / raw)
To: arnd, gregkh
Cc: Frederic Barrat, linuxppc-dev, Lee Jones, linux-kernel, Andrew Donnellan
Keeping the pointer increment though.
Fixes the following W=1 kernel build warning:
drivers/misc/cxl/flash.c: In function ‘update_devicetree’:
drivers/misc/cxl/flash.c:178:16: warning: variable ‘drc_index’ set but not used [-Wunused-but-set-variable]
178 | __be32 *data, drc_index, phandle;
| ^~~~~~~~~
Cc: Frederic Barrat <fbarrat@linux.ibm.com>
Cc: Andrew Donnellan <ajd@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/misc/cxl/flash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/cxl/flash.c b/drivers/misc/cxl/flash.c
index cb9cca35a2263..774d582ddd70b 100644
--- a/drivers/misc/cxl/flash.c
+++ b/drivers/misc/cxl/flash.c
@@ -175,7 +175,7 @@ static int update_devicetree(struct cxl *adapter, s32 scope)
struct update_nodes_workarea *unwa;
u32 action, node_count;
int token, rc, i;
- __be32 *data, drc_index, phandle;
+ __be32 *data, phandle;
char *buf;
token = rtas_token("ibm,update-nodes");
@@ -213,7 +213,7 @@ static int update_devicetree(struct cxl *adapter, s32 scope)
break;
case OPCODE_ADD:
/* nothing to do, just move pointer */
- drc_index = *data++;
+ *data++;
break;
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 0/3] Mop-up last remaining patches for Misc
2020-07-08 12:57 [PATCH 0/3] Mop-up last remaining patches for Misc Lee Jones
` (2 preceding siblings ...)
2020-07-08 12:57 ` Lee Jones
@ 2020-07-08 13:07 ` Arnd Bergmann
3 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2020-07-08 13:07 UTC (permalink / raw)
To: Lee Jones; +Cc: gregkh, linux-kernel
On Wed, Jul 8, 2020 at 2:57 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> These required fix-ups or were waiting on review.
>
> Lee Jones (3):
> misc: vmw_vmci_defs: Mark 'struct vmci_handle VMCI_ANON_SRC_HANDLE' as
> __maybe_unused
> misc: eeprom: at24: Tell the compiler that ACPI functions may not be
> used
> misc: cxl: flash: Remove unused variable 'drc_index'
All three
Acked-by: Arnd Bergmann <arnd@arndb.de>
Thanks for the cleanup!
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] misc: cxl: flash: Remove unused variable 'drc_index'
2020-07-08 12:57 ` Lee Jones
@ 2020-07-08 13:17 ` Andrew Donnellan
-1 siblings, 0 replies; 15+ messages in thread
From: Andrew Donnellan @ 2020-07-08 13:17 UTC (permalink / raw)
To: Lee Jones, arnd, gregkh; +Cc: linux-kernel, Frederic Barrat, linuxppc-dev
On 8/7/20 10:57 pm, Lee Jones wrote:
> Keeping the pointer increment though.
>
> Fixes the following W=1 kernel build warning:
>
> drivers/misc/cxl/flash.c: In function ‘update_devicetree’:
> drivers/misc/cxl/flash.c:178:16: warning: variable ‘drc_index’ set but not used [-Wunused-but-set-variable]
> 178 | __be32 *data, drc_index, phandle;
> | ^~~~~~~~~
>
> Cc: Frederic Barrat <fbarrat@linux.ibm.com>
> Cc: Andrew Donnellan <ajd@linux.ibm.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com>
--
Andrew Donnellan OzLabs, ADL Canberra
ajd@linux.ibm.com IBM Australia Limited
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] misc: cxl: flash: Remove unused variable 'drc_index'
@ 2020-07-08 13:17 ` Andrew Donnellan
0 siblings, 0 replies; 15+ messages in thread
From: Andrew Donnellan @ 2020-07-08 13:17 UTC (permalink / raw)
To: Lee Jones, arnd, gregkh; +Cc: Frederic Barrat, linuxppc-dev, linux-kernel
On 8/7/20 10:57 pm, Lee Jones wrote:
> Keeping the pointer increment though.
>
> Fixes the following W=1 kernel build warning:
>
> drivers/misc/cxl/flash.c: In function ‘update_devicetree’:
> drivers/misc/cxl/flash.c:178:16: warning: variable ‘drc_index’ set but not used [-Wunused-but-set-variable]
> 178 | __be32 *data, drc_index, phandle;
> | ^~~~~~~~~
>
> Cc: Frederic Barrat <fbarrat@linux.ibm.com>
> Cc: Andrew Donnellan <ajd@linux.ibm.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com>
--
Andrew Donnellan OzLabs, ADL Canberra
ajd@linux.ibm.com IBM Australia Limited
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] misc: cxl: flash: Remove unused variable 'drc_index'
2020-07-08 12:57 ` Lee Jones
(?)
@ 2020-07-08 18:07 ` kernel test robot
-1 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2020-07-08 18:07 UTC (permalink / raw)
To: Lee Jones, arnd, gregkh
Cc: kbuild-all, linux-kernel, Lee Jones, Frederic Barrat,
Andrew Donnellan, linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 3138 bytes --]
Hi Lee,
I love your patch! Yet something to improve:
[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on soc/for-next linux/master linus/master v5.8-rc4 next-20200708]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Lee-Jones/Mop-up-last-remaining-patches-for-Misc/20200708-205913
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 8ab11d705c3b33ae4c6ca05eefaf025b7c5dbeaf
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/misc/cxl/flash.c: In function 'update_devicetree':
>> drivers/misc/cxl/flash.c:216:6: error: value computed is not used [-Werror=unused-value]
216 | *data++;
| ^~~~~~~
cc1: all warnings being treated as errors
vim +216 drivers/misc/cxl/flash.c
172
173 static int update_devicetree(struct cxl *adapter, s32 scope)
174 {
175 struct update_nodes_workarea *unwa;
176 u32 action, node_count;
177 int token, rc, i;
178 __be32 *data, phandle;
179 char *buf;
180
181 token = rtas_token("ibm,update-nodes");
182 if (token == RTAS_UNKNOWN_SERVICE)
183 return -EINVAL;
184
185 buf = kzalloc(RTAS_DATA_BUF_SIZE, GFP_KERNEL);
186 if (!buf)
187 return -ENOMEM;
188
189 unwa = (struct update_nodes_workarea *)&buf[0];
190 unwa->unit_address = cpu_to_be64(adapter->guest->handle);
191 do {
192 rc = rcall(token, buf, scope);
193 if (rc && rc != 1)
194 break;
195
196 data = (__be32 *)buf + 4;
197 while (be32_to_cpu(*data) & NODE_ACTION_MASK) {
198 action = be32_to_cpu(*data) & NODE_ACTION_MASK;
199 node_count = be32_to_cpu(*data) & NODE_COUNT_MASK;
200 pr_devel("device reconfiguration - action: %#x, nodes: %#x\n",
201 action, node_count);
202 data++;
203
204 for (i = 0; i < node_count; i++) {
205 phandle = *data++;
206
207 switch (action) {
208 case OPCODE_DELETE:
209 /* nothing to do */
210 break;
211 case OPCODE_UPDATE:
212 update_node(phandle, scope);
213 break;
214 case OPCODE_ADD:
215 /* nothing to do, just move pointer */
> 216 *data++;
217 break;
218 }
219 }
220 }
221 } while (rc == 1);
222
223 kfree(buf);
224 return 0;
225 }
226
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26292 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] misc: cxl: flash: Remove unused variable 'drc_index'
@ 2020-07-08 18:07 ` kernel test robot
0 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2020-07-08 18:07 UTC (permalink / raw)
To: Lee Jones, arnd, gregkh
Cc: kbuild-all, Andrew Donnellan, linuxppc-dev, linux-kernel,
Frederic Barrat, Lee Jones
[-- Attachment #1: Type: text/plain, Size: 3138 bytes --]
Hi Lee,
I love your patch! Yet something to improve:
[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on soc/for-next linux/master linus/master v5.8-rc4 next-20200708]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Lee-Jones/Mop-up-last-remaining-patches-for-Misc/20200708-205913
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 8ab11d705c3b33ae4c6ca05eefaf025b7c5dbeaf
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/misc/cxl/flash.c: In function 'update_devicetree':
>> drivers/misc/cxl/flash.c:216:6: error: value computed is not used [-Werror=unused-value]
216 | *data++;
| ^~~~~~~
cc1: all warnings being treated as errors
vim +216 drivers/misc/cxl/flash.c
172
173 static int update_devicetree(struct cxl *adapter, s32 scope)
174 {
175 struct update_nodes_workarea *unwa;
176 u32 action, node_count;
177 int token, rc, i;
178 __be32 *data, phandle;
179 char *buf;
180
181 token = rtas_token("ibm,update-nodes");
182 if (token == RTAS_UNKNOWN_SERVICE)
183 return -EINVAL;
184
185 buf = kzalloc(RTAS_DATA_BUF_SIZE, GFP_KERNEL);
186 if (!buf)
187 return -ENOMEM;
188
189 unwa = (struct update_nodes_workarea *)&buf[0];
190 unwa->unit_address = cpu_to_be64(adapter->guest->handle);
191 do {
192 rc = rcall(token, buf, scope);
193 if (rc && rc != 1)
194 break;
195
196 data = (__be32 *)buf + 4;
197 while (be32_to_cpu(*data) & NODE_ACTION_MASK) {
198 action = be32_to_cpu(*data) & NODE_ACTION_MASK;
199 node_count = be32_to_cpu(*data) & NODE_COUNT_MASK;
200 pr_devel("device reconfiguration - action: %#x, nodes: %#x\n",
201 action, node_count);
202 data++;
203
204 for (i = 0; i < node_count; i++) {
205 phandle = *data++;
206
207 switch (action) {
208 case OPCODE_DELETE:
209 /* nothing to do */
210 break;
211 case OPCODE_UPDATE:
212 update_node(phandle, scope);
213 break;
214 case OPCODE_ADD:
215 /* nothing to do, just move pointer */
> 216 *data++;
217 break;
218 }
219 }
220 }
221 } while (rc == 1);
222
223 kfree(buf);
224 return 0;
225 }
226
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26292 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] misc: cxl: flash: Remove unused variable 'drc_index'
@ 2020-07-08 18:07 ` kernel test robot
0 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2020-07-08 18:07 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3232 bytes --]
Hi Lee,
I love your patch! Yet something to improve:
[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on soc/for-next linux/master linus/master v5.8-rc4 next-20200708]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Lee-Jones/Mop-up-last-remaining-patches-for-Misc/20200708-205913
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 8ab11d705c3b33ae4c6ca05eefaf025b7c5dbeaf
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/misc/cxl/flash.c: In function 'update_devicetree':
>> drivers/misc/cxl/flash.c:216:6: error: value computed is not used [-Werror=unused-value]
216 | *data++;
| ^~~~~~~
cc1: all warnings being treated as errors
vim +216 drivers/misc/cxl/flash.c
172
173 static int update_devicetree(struct cxl *adapter, s32 scope)
174 {
175 struct update_nodes_workarea *unwa;
176 u32 action, node_count;
177 int token, rc, i;
178 __be32 *data, phandle;
179 char *buf;
180
181 token = rtas_token("ibm,update-nodes");
182 if (token == RTAS_UNKNOWN_SERVICE)
183 return -EINVAL;
184
185 buf = kzalloc(RTAS_DATA_BUF_SIZE, GFP_KERNEL);
186 if (!buf)
187 return -ENOMEM;
188
189 unwa = (struct update_nodes_workarea *)&buf[0];
190 unwa->unit_address = cpu_to_be64(adapter->guest->handle);
191 do {
192 rc = rcall(token, buf, scope);
193 if (rc && rc != 1)
194 break;
195
196 data = (__be32 *)buf + 4;
197 while (be32_to_cpu(*data) & NODE_ACTION_MASK) {
198 action = be32_to_cpu(*data) & NODE_ACTION_MASK;
199 node_count = be32_to_cpu(*data) & NODE_COUNT_MASK;
200 pr_devel("device reconfiguration - action: %#x, nodes: %#x\n",
201 action, node_count);
202 data++;
203
204 for (i = 0; i < node_count; i++) {
205 phandle = *data++;
206
207 switch (action) {
208 case OPCODE_DELETE:
209 /* nothing to do */
210 break;
211 case OPCODE_UPDATE:
212 update_node(phandle, scope);
213 break;
214 case OPCODE_ADD:
215 /* nothing to do, just move pointer */
> 216 *data++;
217 break;
218 }
219 }
220 }
221 } while (rc == 1);
222
223 kfree(buf);
224 return 0;
225 }
226
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26292 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 3/3] misc: cxl: flash: Remove unused variable 'drc_index'
2020-07-08 12:57 ` Lee Jones
@ 2020-07-09 6:56 ` Lee Jones
-1 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2020-07-09 6:56 UTC (permalink / raw)
To: arnd, gregkh
Cc: linux-kernel, Frederic Barrat, Andrew Donnellan, linuxppc-dev
Keeping the pointer increment though.
Fixes the following W=1 kernel build warning:
drivers/misc/cxl/flash.c: In function ‘update_devicetree’:
drivers/misc/cxl/flash.c:178:16: warning: variable ‘drc_index’ set but not used [-Wunused-but-set-variable]
178 | __be32 *data, drc_index, phandle;
| ^~~~~~~~~
Cc: Frederic Barrat <fbarrat@linux.ibm.com>
Cc: Andrew Donnellan <ajd@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
Changelog:
v1 => v2:
- Fix "flash.c:216:6: error: value computed is not used [-Werror=unused-value]"
- ... as reported by Intel's Kernel Test Robot
drivers/misc/cxl/flash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/cxl/flash.c b/drivers/misc/cxl/flash.c
index cb9cca35a2263..5b93ff51d82a5 100644
--- a/drivers/misc/cxl/flash.c
+++ b/drivers/misc/cxl/flash.c
@@ -175,7 +175,7 @@ static int update_devicetree(struct cxl *adapter, s32 scope)
struct update_nodes_workarea *unwa;
u32 action, node_count;
int token, rc, i;
- __be32 *data, drc_index, phandle;
+ __be32 *data, phandle;
char *buf;
token = rtas_token("ibm,update-nodes");
@@ -213,7 +213,7 @@ static int update_devicetree(struct cxl *adapter, s32 scope)
break;
case OPCODE_ADD:
/* nothing to do, just move pointer */
- drc_index = *data++;
+ data++;
break;
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 3/3] misc: cxl: flash: Remove unused variable 'drc_index'
@ 2020-07-09 6:56 ` Lee Jones
0 siblings, 0 replies; 15+ messages in thread
From: Lee Jones @ 2020-07-09 6:56 UTC (permalink / raw)
To: arnd, gregkh
Cc: Frederic Barrat, linuxppc-dev, linux-kernel, Andrew Donnellan
Keeping the pointer increment though.
Fixes the following W=1 kernel build warning:
drivers/misc/cxl/flash.c: In function ‘update_devicetree’:
drivers/misc/cxl/flash.c:178:16: warning: variable ‘drc_index’ set but not used [-Wunused-but-set-variable]
178 | __be32 *data, drc_index, phandle;
| ^~~~~~~~~
Cc: Frederic Barrat <fbarrat@linux.ibm.com>
Cc: Andrew Donnellan <ajd@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
Changelog:
v1 => v2:
- Fix "flash.c:216:6: error: value computed is not used [-Werror=unused-value]"
- ... as reported by Intel's Kernel Test Robot
drivers/misc/cxl/flash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/cxl/flash.c b/drivers/misc/cxl/flash.c
index cb9cca35a2263..5b93ff51d82a5 100644
--- a/drivers/misc/cxl/flash.c
+++ b/drivers/misc/cxl/flash.c
@@ -175,7 +175,7 @@ static int update_devicetree(struct cxl *adapter, s32 scope)
struct update_nodes_workarea *unwa;
u32 action, node_count;
int token, rc, i;
- __be32 *data, drc_index, phandle;
+ __be32 *data, phandle;
char *buf;
token = rtas_token("ibm,update-nodes");
@@ -213,7 +213,7 @@ static int update_devicetree(struct cxl *adapter, s32 scope)
break;
case OPCODE_ADD:
/* nothing to do, just move pointer */
- drc_index = *data++;
+ data++;
break;
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH v2 3/3] misc: cxl: flash: Remove unused variable 'drc_index'
2020-07-09 6:56 ` Lee Jones
@ 2020-07-09 7:08 ` Andrew Donnellan
-1 siblings, 0 replies; 15+ messages in thread
From: Andrew Donnellan @ 2020-07-09 7:08 UTC (permalink / raw)
To: Lee Jones, arnd, gregkh; +Cc: linux-kernel, Frederic Barrat, linuxppc-dev
On 9/7/20 4:56 pm, Lee Jones wrote:
> Keeping the pointer increment though.
>
> Fixes the following W=1 kernel build warning:
>
> drivers/misc/cxl/flash.c: In function ‘update_devicetree’:
> drivers/misc/cxl/flash.c:178:16: warning: variable ‘drc_index’ set but not used [-Wunused-but-set-variable]
> 178 | __be32 *data, drc_index, phandle;
> | ^~~~~~~~~
>
> Cc: Frederic Barrat <fbarrat@linux.ibm.com>
> Cc: Andrew Donnellan <ajd@linux.ibm.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com>
--
Andrew Donnellan OzLabs, ADL Canberra
ajd@linux.ibm.com IBM Australia Limited
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 3/3] misc: cxl: flash: Remove unused variable 'drc_index'
@ 2020-07-09 7:08 ` Andrew Donnellan
0 siblings, 0 replies; 15+ messages in thread
From: Andrew Donnellan @ 2020-07-09 7:08 UTC (permalink / raw)
To: Lee Jones, arnd, gregkh; +Cc: Frederic Barrat, linuxppc-dev, linux-kernel
On 9/7/20 4:56 pm, Lee Jones wrote:
> Keeping the pointer increment though.
>
> Fixes the following W=1 kernel build warning:
>
> drivers/misc/cxl/flash.c: In function ‘update_devicetree’:
> drivers/misc/cxl/flash.c:178:16: warning: variable ‘drc_index’ set but not used [-Wunused-but-set-variable]
> 178 | __be32 *data, drc_index, phandle;
> | ^~~~~~~~~
>
> Cc: Frederic Barrat <fbarrat@linux.ibm.com>
> Cc: Andrew Donnellan <ajd@linux.ibm.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com>
--
Andrew Donnellan OzLabs, ADL Canberra
ajd@linux.ibm.com IBM Australia Limited
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2020-07-09 7:11 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 12:57 [PATCH 0/3] Mop-up last remaining patches for Misc Lee Jones
2020-07-08 12:57 ` [PATCH 1/3] misc: vmw_vmci_defs: Mark 'struct vmci_handle VMCI_ANON_SRC_HANDLE' as __maybe_unused Lee Jones
2020-07-08 12:57 ` [PATCH 2/3] misc: eeprom: at24: Tell the compiler that ACPI functions may not be used Lee Jones
2020-07-08 12:57 ` [PATCH 3/3] misc: cxl: flash: Remove unused variable 'drc_index' Lee Jones
2020-07-08 12:57 ` Lee Jones
2020-07-08 13:17 ` Andrew Donnellan
2020-07-08 13:17 ` Andrew Donnellan
2020-07-08 18:07 ` kernel test robot
2020-07-08 18:07 ` kernel test robot
2020-07-08 18:07 ` kernel test robot
2020-07-09 6:56 ` [PATCH v2 " Lee Jones
2020-07-09 6:56 ` Lee Jones
2020-07-09 7:08 ` Andrew Donnellan
2020-07-09 7:08 ` Andrew Donnellan
2020-07-08 13:07 ` [PATCH 0/3] Mop-up last remaining patches for Misc Arnd Bergmann
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.