Skip to contentSkip to conversation

Add an API for edac device, for mulriple errors

PATCH Superseded Hanna Hawa 3 participants 8 messages Sep 19, 2019 – Sep 23, 2019 EDAC-core

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Hanna Hawa

author
#0 lore raw

v3 cover Add an API for edac device, for mulriple errors

Add an API for EDAC device to report for multiple errors, and move the old report function to use the new API.

Changes from v2:
----------------
- Remove copy of edac_device_handle_*() functions, modify the existing functions.

Changes from v1:
----------------
- use 'unsigned int' instead of u16
- update variable name to be count
- remove WARN_ON and simply exit if count is zero
- add inline functions in header file

Hanna Hawa (2):
edac: Add an API for edac device to report for multiple errors
edac: move edac_device_handle_*() API functions to header

 drivers/edac/edac_device.c | 50 +++++++++++++++++-------------
 drivers/edac/edac_device.h | 63 ++++++++++++++++++++++++++++----------
 2 files changed, 76 insertions(+), 37 deletions(-)
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v3 1/2 edac: Add an API for edac device to report for multiple errors

Add an API for EDAC device to report multiple errors with same type.

---
 drivers/edac/edac_device.c | 62 ++++++++++++++++++++++++++------------
 drivers/edac/edac_device.h | 40 ++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 20 deletions(-)
drivers/edac/edac_device.c +42 -20
index 65cf2b9355c4..866934f2bcb0 100644
@@ -555,12 +555,16 @@ static inline int edac_device_get_panic_on_ue(struct edac_device_ctl_info
 	return edac_dev->panic_on_ue;
 }
 
-void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
-			int inst_nr, int block_nr, const char *msg)
+void __edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
+			     unsigned int count, int inst_nr, int block_nr,
+			     const char *msg)
 {
 	struct edac_device_instance *instance;
 	struct edac_device_block *block = NULL;
 
+	if (!count)
+		return;
+
 	if ((inst_nr >= edac_dev->nr_instances) || (inst_nr < 0)) {
 		edac_device_printk(edac_dev, KERN_ERR,
 				"INTERNAL ERROR: 'instance' out of range "
@@ -582,27 +586,31 @@ void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
 
 	if (instance->nr_blocks > 0) {
 		block = instance->blocks + block_nr;
-		block->counters.ce_count++;
+		block->counters.ce_count += count;
 	}
 
 	/* Propagate the count up the 'totals' tree */
-	instance->counters.ce_count++;
-	edac_dev->counters.ce_count++;
+	instance->counters.ce_count += count;
+	edac_dev->counters.ce_count += count;
 
 	if (edac_device_get_log_ce(edac_dev))
 		edac_device_printk(edac_dev, KERN_WARNING,
-				"CE: %s instance: %s block: %s '%s'\n",
-				edac_dev->ctl_name, instance->name,
-				block ? block->name : "N/A", msg);
+				   "CE: %s instance: %s block: %s count: %d '%s'\n",
+				   edac_dev->ctl_name, instance->name,
+				   block ? block->name : "N/A", count, msg);
 }
-EXPORT_SYMBOL_GPL(edac_device_handle_ce);
+EXPORT_SYMBOL_GPL(__edac_device_handle_ce);
 
-void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
-			int inst_nr, int block_nr, const char *msg)
+void __edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
+			     unsigned int count, int inst_nr, int block_nr,
+			     const char *msg)
 {
 	struct edac_device_instance *instance;
 	struct edac_device_block *block = NULL;
 
+	if (!count)
+		return;
+
 	if ((inst_nr >= edac_dev->nr_instances) || (inst_nr < 0)) {
 		edac_device_printk(edac_dev, KERN_ERR,
 				"INTERNAL ERROR: 'instance' out of range "
@@ -624,22 +632,36 @@ void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
 
 	if (instance->nr_blocks > 0) {
 		block = instance->blocks + block_nr;
-		block->counters.ue_count++;
+		block->counters.ue_count += count;
 	}
 
 	/* Propagate the count up the 'totals' tree */
-	instance->counters.ue_count++;
-	edac_dev->counters.ue_count++;
+	instance->counters.ue_count += count;
+	edac_dev->counters.ue_count += count;
 
 	if (edac_device_get_log_ue(edac_dev))
 		edac_device_printk(edac_dev, KERN_EMERG,
-				"UE: %s instance: %s block: %s '%s'\n",
-				edac_dev->ctl_name, instance->name,
-				block ? block->name : "N/A", msg);
+				   "UE: %s instance: %s block: %s count: %d '%s'\n",
+				   edac_dev->ctl_name, instance->name,
+				   block ? block->name : "N/A", count, msg);
 
 	if (edac_device_get_panic_on_ue(edac_dev))
-		panic("EDAC %s: UE instance: %s block %s '%s'\n",
-			edac_dev->ctl_name, instance->name,
-			block ? block->name : "N/A", msg);
+		panic("EDAC %s: UE instance: %s block %s count: %d '%s'\n",
+		      edac_dev->ctl_name, instance->name,
+		      block ? block->name : "N/A", count, msg);
+}
+EXPORT_SYMBOL_GPL(__edac_device_handle_ue);
+
+void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
+			int inst_nr, int block_nr, const char *msg)
+{
+	__edac_device_handle_ce(edac_dev, 1, inst_nr, block_nr, msg);
+}
+EXPORT_SYMBOL_GPL(edac_device_handle_ce);
+
+void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
+			int inst_nr, int block_nr, const char *msg)
+{
+	__edac_device_handle_ue(edac_dev, 1, inst_nr, block_nr, msg);
 }
 EXPORT_SYMBOL_GPL(edac_device_handle_ue);
drivers/edac/edac_device.h +40 -0
index 1aaba74ae411..30dc5f5979c8 100644
@@ -317,4 +317,44 @@ extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
 extern int edac_device_alloc_index(void);
 extern const char *edac_layer_name[];
 
+/**
+ * __edac_device_handle_ue():
+ *	perform a common output and handling of an 'edac_dev' UE event
+ *
+ * @edac_dev: pointer to struct &edac_device_ctl_info
+ * @error_count: number of errors of the same type
+ * @inst_nr: number of the instance where the UE error happened
+ * @block_nr: number of the block where the UE error happened
+ * @msg: message to be printed
+ */
+void __edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
+				    unsigned int count, int inst_nr,
+				    int block_nr, const char *msg);
+/**
+ * __edac_device_handle_ce():
+ *	perform a common output and handling of an 'edac_dev' CE event
+ *
+ * @edac_dev: pointer to struct &edac_device_ctl_info
+ * @error_count: number of errors of the same type
+ * @inst_nr: number of the instance where the CE error happened
+ * @block_nr: number of the block where the CE error happened
+ * @msg: message to be printed
+ */
+void __edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
+				    unsigned int count, int inst_nr,
+				    int block_nr, const char *msg);
+
+static inline void edac_device_handle_ce_count(struct edac_device_ctl_info *edac_dev,
+					       unsigned int count, int inst_nr,
+					       int block_nr, const char *msg)
+{
+	__edac_device_handle_ce(edac_dev, count, inst_nr, block_nr, msg);
+}
+
+static inline void edac_device_handle_ue_count(struct edac_device_ctl_info *edac_dev,
+					       unsigned int count, int inst_nr,
+					       int block_nr, const char *msg)
+{
+	__edac_device_handle_ue(edac_dev, count, inst_nr, block_nr, msg);
+}
 #endif
Signature · 1 line
2.17.1
Acked-by on v3 1/2
#2 lore raw

Re: [PATCH v3 1/2] edac: Add an API for edac device to report for multiple errors

Quoted 3 lines · Hanna Hawa

Add an API for EDAC device to report multiple errors with same type.

With the change below it looks good to me:

Thanks,

-Robert

Quoted 15 lines
---
 drivers/edac/edac_device.c | 62 ++++++++++++++++++++++++++------------
 drivers/edac/edac_device.h | 40 ++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 20 deletions(-)
drivers/edac/edac_device.c +0 -2
index 65cf2b9355c4..866934f2bcb0 100644
@@ -555,12 +555,16 @@ static inline int edac_device_get_panic_on_ue(struct edac_device_ctl_info
 	return edac_dev->panic_on_ue;
 }
 
-void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
-			int inst_nr, int block_nr, const char *msg)

drivers/edac/edac_device.c static inline int edac_device_get_panic_on_ue(struct edac_device_ctl_info · line 567

Quoted 10 lines
drivers/edac/edac_device.c +6 -0
+void __edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
+			     unsigned int count, int inst_nr, int block_nr,
+			     const char *msg)
 {
 	struct edac_device_instance *instance;
 	struct edac_device_block *block = NULL;
 
+	if (!count)
+		return;
+

Those checks should be moved to the *_count() variants of both functions.

[...]

drivers/edac/edac_device.c static inline int edac_device_get_panic_on_ue(struct edac_device_ctl_info

Quoted 4 lines
drivers/edac/edac_device.c +4 -0
+static inline void edac_device_handle_ce_count(struct edac_device_ctl_info *edac_dev,
+					       unsigned int count, int inst_nr,
+					       int block_nr, const char *msg)
+{
	if (count)
		...

drivers/edac/edac_device.c

Quoted 7 lines
drivers/edac/edac_device.c +7 -0
+	__edac_device_handle_ce(edac_dev, count, inst_nr, block_nr, msg);
+}
+
+static inline void edac_device_handle_ue_count(struct edac_device_ctl_info *edac_dev,
+					       unsigned int count, int inst_nr,
+					       int block_nr, const char *msg)
+{

Here too.

Quoted 2 lines
drivers/edac/edac_device.c +2 -0
+	__edac_device_handle_ue(edac_dev, count, inst_nr, block_nr, msg);
+}
#3 lore raw

Re: [PATCH v3 1/2] edac: Add an API for edac device to report for multiple errors

Quoted 8 lines · Robert Richter
Quoted 3 lines · Hanna Hawa

Add an API for EDAC device to report multiple errors with same type.

With the change below it looks good to me:

Thanks

Quoted 27 lines

Thanks,

-Robert

Quoted 22 lines
---
  drivers/edac/edac_device.c | 62 ++++++++++++++++++++++++++------------
  drivers/edac/edac_device.h | 40 ++++++++++++++++++++++++
  2 files changed, 82 insertions(+), 20 deletions(-)
drivers/edac/edac_device.c +3 -2
index 65cf2b9355c4..866934f2bcb0 100644
@@ -555,12 +555,16 @@ static inline int edac_device_get_panic_on_ue(struct edac_device_ctl_info
  	return edac_dev->panic_on_ue;
  }
 
-void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
-			int inst_nr, int block_nr, const char *msg)
+void __edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
+			     unsigned int count, int inst_nr, int block_nr,
+			     const char *msg)
  {
  	struct edac_device_instance *instance;
  	struct edac_device_block *block = NULL;
 
Quoted 6 lines

drivers/edac/edac_device.c static inline int edac_device_get_panic_on_ue(struct edac_device_ctl_info · line 567

Quoted 3 lines
drivers/edac/edac_device.c +3 -0
+	if (!count)
+		return;
+

Those checks should be moved to the *_count() variants of both functions.

Will be moved to the inline functions.

Quoted 21 lines

[...]

drivers/edac/edac_device.c

Quoted 4 lines
drivers/edac/edac_device.c +4 -0
+static inline void edac_device_handle_ce_count(struct edac_device_ctl_info *edac_dev,
+					       unsigned int count, int inst_nr,
+					       int block_nr, const char *msg)
+{
	if (count)
		...

drivers/edac/edac_device.c

Quoted 7 lines
drivers/edac/edac_device.c +7 -0
+	__edac_device_handle_ce(edac_dev, count, inst_nr, block_nr, msg);
+}
+
+static inline void edac_device_handle_ue_count(struct edac_device_ctl_info *edac_dev,
+					       unsigned int count, int inst_nr,
+					       int block_nr, const char *msg)
+{

Here too.

Quoted 2 lines

drivers/edac/edac_device.c

Quoted 2 lines
drivers/edac/edac_device.c +2 -0
+	__edac_device_handle_ue(edac_dev, count, inst_nr, block_nr, msg);
+}

Thanks,
Hanna

#4 lore raw

Re: [PATCH v3 1/2] edac: Add an API for edac device to report for multiple errors

In reply to Hanna Hawa
Thank you for the patch! Perhaps something to improve:

Hi Hanna,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[cannot apply to v5.3 next-20190919]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Hanna-Hawa/Add-an-API-for-edac-device-for-mulriple-errors/20190920-012316
reproduce: make htmldocs
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

If you fix the issue, kindly add following tag

All warnings (new ones prefixed by >>):

Warning: The Sphinx 'sphinx_rtd_theme' HTML theme was not found. Make sure you have the theme installed to produce pretty HTML output. Falling back to the default theme.
WARNING: dot(1) not found, for better output quality install graphviz from http://www.graphviz.org
WARNING: convert(1) not found, for SVG to PDF conversion install ImageMagick (https://www.imagemagick.org)
include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'quotactl' not described in 'security_list_options' include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'quota_on' not described in 'security_list_options' include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'sb_free_mnt_opts' not described in 'security_list_options' include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'sb_eat_lsm_opts' not described in 'security_list_options' include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'sb_kern_mount' not described in 'security_list_options' include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'sb_show_options' not described in 'security_list_options' include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'sb_add_mnt_opt' not described in 'security_list_options' include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'd_instantiate' not described in 'security_list_options' include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'getprocattr' not described in 'security_list_options' include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'setprocattr' not described in 'security_list_options'

>> drivers/edac/edac_device.h:332: warning: Function parameter or member 'count' not described in '__edac_device_handle_ue'
   drivers/edac/edac_device.h:332: warning: Excess function parameter 'error_count' description in '__edac_device_handle_ue'
>> drivers/edac/edac_device.h:345: warning: Function parameter or member 'count' not described in '__edac_device_handle_ce'

drivers/edac/edac_device.h:345: warning: Excess function parameter 'error_count' description in '__edac_device_handle_ce' include/linux/regulator/machine.h:196: warning: Function parameter or member 'max_uV_step' not described in 'regulation_constraints' include/linux/regulator/driver.h:223: warning: Function parameter or member 'resume' not described in 'regulator_ops' include/linux/spi/spi.h:190: warning: Function parameter or member 'driver_override' not described in 'spi_device' fs/fs-writeback.c:913: warning: Excess function parameter 'nr_pages' description in 'cgroup_writeback_by_id' fs/direct-io.c:258: warning: Excess function parameter 'offset' description in 'dio_complete'
fs/libfs.c:496: warning: Excess function parameter 'available' description in 'simple_write_end'
fs/posix_acl.c:647: warning: Function parameter or member 'inode' not described in 'posix_acl_update_mode'
fs/posix_acl.c:647: warning: Function parameter or member 'mode_p' not described in 'posix_acl_update_mode'
fs/posix_acl.c:647: warning: Function parameter or member 'acl' not described in 'posix_acl_update_mode' drivers/usb/typec/bus.c:1: warning: 'typec_altmode_unregister_driver' not found
drivers/usb/typec/bus.c:1: warning: 'typec_altmode_register_driver' not found
drivers/usb/typec/class.c:1: warning: 'typec_altmode_unregister_notifier' not found
drivers/usb/typec/class.c:1: warning: 'typec_altmode_register_notifier' not found
include/linux/w1.h:277: warning: Function parameter or member 'of_match_table' not described in 'w1_family' include/linux/skbuff.h:888: warning: Function parameter or member 'dev_scratch' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'list' not described in 'sk_buff'
include/linux/skbuff.h:888: warning: Function parameter or member 'ip_defrag_offset' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'skb_mstamp_ns' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member '__cloned_offset' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'head_frag' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member '__pkt_type_offset' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'encapsulation' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'encap_hdr_csum' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'csum_valid' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member '__pkt_vlan_present_offset' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'vlan_present' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'csum_complete_sw' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'csum_level' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'inner_protocol_type' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'remcsum_offload' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'sender_cpu' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'reserved_tailroom' not described in 'sk_buff' include/linux/skbuff.h:888: warning: Function parameter or member 'inner_ipproto' not described in 'sk_buff' include/net/sock.h:233: warning: Function parameter or member 'skc_addrpair' not described in 'sock_common' include/net/sock.h:233: warning: Function parameter or member 'skc_portpair' not described in 'sock_common' include/net/sock.h:233: warning: Function parameter or member 'skc_ipv6only' not described in 'sock_common' include/net/sock.h:233: warning: Function parameter or member 'skc_net_refcnt' not described in 'sock_common' include/net/sock.h:233: warning: Function parameter or member 'skc_v6_daddr' not described in 'sock_common' include/net/sock.h:233: warning: Function parameter or member 'skc_v6_rcv_saddr' not described in 'sock_common' include/net/sock.h:233: warning: Function parameter or member 'skc_cookie' not described in 'sock_common' include/net/sock.h:233: warning: Function parameter or member 'skc_listener' not described in 'sock_common' include/net/sock.h:233: warning: Function parameter or member 'skc_tw_dr' not described in 'sock_common' include/net/sock.h:233: warning: Function parameter or member 'skc_rcv_wnd' not described in 'sock_common' include/net/sock.h:233: warning: Function parameter or member 'skc_tw_rcv_nxt' not described in 'sock_common' include/net/sock.h:515: warning: Function parameter or member 'sk_rx_skb_cache' not described in 'sock'
include/net/sock.h:515: warning: Function parameter or member 'sk_wq_raw' not described in 'sock'
include/net/sock.h:515: warning: Function parameter or member 'tcp_rtx_queue' not described in 'sock'
include/net/sock.h:515: warning: Function parameter or member 'sk_tx_skb_cache' not described in 'sock'
include/net/sock.h:515: warning: Function parameter or member 'sk_route_forced_caps' not described in 'sock' include/net/sock.h:515: warning: Function parameter or member 'sk_txtime_report_errors' not described in 'sock' include/net/sock.h:515: warning: Function parameter or member 'sk_validate_xmit_skb' not described in 'sock' include/net/sock.h:515: warning: Function parameter or member 'sk_bpf_storage' not described in 'sock'
include/net/sock.h:2439: warning: Function parameter or member 'tcp_rx_skb_cache_key' not described in 'DECLARE_STATIC_KEY_FALSE' include/net/sock.h:2439: warning: Excess function parameter 'sk' description in 'DECLARE_STATIC_KEY_FALSE' include/net/sock.h:2439: warning: Excess function parameter 'skb' description in 'DECLARE_STATIC_KEY_FALSE' include/linux/netdevice.h:2053: warning: Function parameter or member 'gso_partial_features' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member 'l3mdev_ops' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member 'xfrmdev_ops' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member 'tlsdev_ops' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member 'name_assign_type' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member 'ieee802154_ptr' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member 'mpls_ptr' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member 'xdp_prog' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member 'gro_flush_timeout' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member 'nf_hooks_ingress' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member '____cacheline_aligned_in_smp' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member 'qdisc_hash' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member 'xps_cpus_map' not described in 'net_device' include/linux/netdevice.h:2053: warning: Function parameter or member 'xps_rxqs_map' not described in 'net_device' include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising' not described in 'phylink_link_state' include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising' not described in 'phylink_link_state' drivers/net/phy/phylink.c:595: warning: Function parameter or member 'config' not described in 'phylink_create' drivers/net/phy/phylink.c:595: warning: Excess function parameter 'ndev' description in 'phylink_create' drivers/gpio/gpiolib-of.c:92: warning: Excess function parameter 'dev' description in 'of_gpio_need_valid_mask' include/linux/i2c.h:337: warning: Function parameter or member 'init_irq' not described in 'i2c_client' include/linux/input/sparse-keymap.h:43: warning: Function parameter or member 'sw' not described in 'key_entry' lib/genalloc.c:1: warning: 'gen_pool_add_virt' not found
lib/genalloc.c:1: warning: 'gen_pool_alloc' not found
lib/genalloc.c:1: warning: 'gen_pool_free' not found
lib/genalloc.c:1: warning: 'gen_pool_alloc_algo' not found
include/linux/bitmap.h:341: warning: Function parameter or member 'nbits' not described in 'bitmap_or_equal' include/linux/rculist.h:374: warning: Excess function parameter 'cond' description in 'list_for_each_entry_rcu' include/linux/rculist.h:651: warning: Excess function parameter 'cond' description in 'hlist_for_each_entry_rcu'
mm/util.c:1: warning: 'get_user_pages_fast' not found
mm/slab.c:4215: warning: Function parameter or member 'objp' not described in '__ksize' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:142: warning: Function parameter or member 'blockable' not described in 'amdgpu_mn_read_lock' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:347: warning: cannot understand function prototype: 'struct amdgpu_vm_pt_cursor ' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:348: warning: cannot understand function prototype: 'struct amdgpu_vm_pt_cursor ' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:494: warning: Function parameter or member 'start' not described in 'amdgpu_vm_pt_first_dfs' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:546: warning: Function parameter or member 'adev' not described in 'for_each_amdgpu_vm_pt_dfs_safe' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:546: warning: Function parameter or member 'vm' not described in 'for_each_amdgpu_vm_pt_dfs_safe' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:546: warning: Function parameter or member 'start' not described in 'for_each_amdgpu_vm_pt_dfs_safe' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:546: warning: Function parameter or member 'cursor' not described in 'for_each_amdgpu_vm_pt_dfs_safe' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:546: warning: Function parameter or member 'entry' not described in 'for_each_amdgpu_vm_pt_dfs_safe' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:823: warning: Function parameter or member 'level' not described in 'amdgpu_vm_bo_param' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1285: warning: Function parameter or member 'params' not described in 'amdgpu_vm_update_flags' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1285: warning: Function parameter or member 'bo' not described in 'amdgpu_vm_update_flags' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1285: warning: Function parameter or member 'level' not described in 'amdgpu_vm_update_flags' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1285: warning: Function parameter or member 'pe' not described in 'amdgpu_vm_update_flags'

# https://github.com/0day-ci/linux/commit/a424d1ea95bc2f0f1a6f3c8bd097f62c23832281
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout a424d1ea95bc2f0f1a6f3c8bd097f62c23832281
vim +332 drivers/edac/edac_device.h

6d8ef2472410c8 Mauro Carvalho Chehab 2016-10-29  319  
a424d1ea95bc2f Hanna Hawa            2019-09-19  320  /**
a424d1ea95bc2f Hanna Hawa            2019-09-19  321   * __edac_device_handle_ue():
a424d1ea95bc2f Hanna Hawa            2019-09-19  322   *	perform a common output and handling of an 'edac_dev' UE event
a424d1ea95bc2f Hanna Hawa            2019-09-19  323   *
a424d1ea95bc2f Hanna Hawa            2019-09-19  324   * @edac_dev: pointer to struct &edac_device_ctl_info
a424d1ea95bc2f Hanna Hawa            2019-09-19  325   * @error_count: number of errors of the same type
a424d1ea95bc2f Hanna Hawa            2019-09-19  326   * @inst_nr: number of the instance where the UE error happened
a424d1ea95bc2f Hanna Hawa            2019-09-19  327   * @block_nr: number of the block where the UE error happened
a424d1ea95bc2f Hanna Hawa            2019-09-19  328   * @msg: message to be printed
a424d1ea95bc2f Hanna Hawa            2019-09-19  329   */
a424d1ea95bc2f Hanna Hawa            2019-09-19  330  void __edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
a424d1ea95bc2f Hanna Hawa            2019-09-19  331  				    unsigned int count, int inst_nr,
a424d1ea95bc2f Hanna Hawa            2019-09-19 @332  				    int block_nr, const char *msg);
a424d1ea95bc2f Hanna Hawa            2019-09-19  333  /**
a424d1ea95bc2f Hanna Hawa            2019-09-19  334   * __edac_device_handle_ce():
a424d1ea95bc2f Hanna Hawa            2019-09-19  335   *	perform a common output and handling of an 'edac_dev' CE event
a424d1ea95bc2f Hanna Hawa            2019-09-19  336   *
a424d1ea95bc2f Hanna Hawa            2019-09-19  337   * @edac_dev: pointer to struct &edac_device_ctl_info
a424d1ea95bc2f Hanna Hawa            2019-09-19  338   * @error_count: number of errors of the same type
a424d1ea95bc2f Hanna Hawa            2019-09-19  339   * @inst_nr: number of the instance where the CE error happened
a424d1ea95bc2f Hanna Hawa            2019-09-19  340   * @block_nr: number of the block where the CE error happened
a424d1ea95bc2f Hanna Hawa            2019-09-19  341   * @msg: message to be printed
a424d1ea95bc2f Hanna Hawa            2019-09-19  342   */
a424d1ea95bc2f Hanna Hawa            2019-09-19  343  void __edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
a424d1ea95bc2f Hanna Hawa            2019-09-19  344  				    unsigned int count, int inst_nr,
a424d1ea95bc2f Hanna Hawa            2019-09-19 @345  				    int block_nr, const char *msg);
a424d1ea95bc2f Hanna Hawa            2019-09-19  346  

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

author
#5 lore raw

PATCH v3 2/2 edac: move edac_device_handle_*() API functions to header

In reply to Hanna Hawa

Move edac_device_handle_*() functions from source file to header file as inline funtcion that use the new API with single error.

---
 drivers/edac/edac_device.c | 14 --------------
 drivers/edac/edac_device.h | 37 ++++++++++++++-----------------------
 2 files changed, 14 insertions(+), 37 deletions(-)
drivers/edac/edac_device.c +0 -14
index 866934f2bcb0..d54223594916 100644
@@ -651,17 +651,3 @@ void __edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
 		      block ? block->name : "N/A", count, msg);
 }
 EXPORT_SYMBOL_GPL(__edac_device_handle_ue);
-
-void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
-			int inst_nr, int block_nr, const char *msg)
-{
-	__edac_device_handle_ce(edac_dev, 1, inst_nr, block_nr, msg);
-}
-EXPORT_SYMBOL_GPL(edac_device_handle_ce);
-
-void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
-			int inst_nr, int block_nr, const char *msg)
-{
-	__edac_device_handle_ue(edac_dev, 1, inst_nr, block_nr, msg);
-}
-EXPORT_SYMBOL_GPL(edac_device_handle_ue);
drivers/edac/edac_device.h +14 -23
index 30dc5f5979c8..796ea134a691 100644
@@ -285,29 +285,6 @@ extern int edac_device_add_device(struct edac_device_ctl_info *edac_dev);
  */
 extern struct edac_device_ctl_info *edac_device_del_device(struct device *dev);
 
-/**
- * edac_device_handle_ue():
- *	perform a common output and handling of an 'edac_dev' UE event
- *
- * @edac_dev: pointer to struct &edac_device_ctl_info
- * @inst_nr: number of the instance where the UE error happened
- * @block_nr: number of the block where the UE error happened
- * @msg: message to be printed
- */
-extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
-				int inst_nr, int block_nr, const char *msg);
-/**
- * edac_device_handle_ce():
- *	perform a common output and handling of an 'edac_dev' CE event
- *
- * @edac_dev: pointer to struct &edac_device_ctl_info
- * @inst_nr: number of the instance where the CE error happened
- * @block_nr: number of the block where the CE error happened
- * @msg: message to be printed
- */
-extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
-				int inst_nr, int block_nr, const char *msg);
-
 /**
  * edac_device_alloc_index: Allocate a unique device index number
  *
@@ -357,4 +334,18 @@ static inline void edac_device_handle_ue_count(struct edac_device_ctl_info *edac
 {
 	__edac_device_handle_ue(edac_dev, count, inst_nr, block_nr, msg);
 }
+
+static inline void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
+					 int inst_nr, int block_nr,
+					 const char *msg)
+{
+	__edac_device_handle_ce(edac_dev, 1, inst_nr, block_nr, msg);
+}
+
+static inline void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
+					 int inst_nr, int block_nr,
+					 const char *msg)
+{
+	__edac_device_handle_ue(edac_dev, 1, inst_nr, block_nr, msg);
+}
 #endif
Signature · 1 line
2.17.1
Acked-by on v3 2/2
#6 lore raw

Re: [PATCH v3 2/2] edac: move edac_device_handle_*() API functions to header

Quoted 4 lines · Hanna Hawa

Move edac_device_handle_*() functions from source file to header file as inline funtcion that use the new API with single error.

With the changes below it looks good to me:

Thanks,

-Robert

Quoted 21 lines
drivers/edac/edac_device.h +0 -13
index 30dc5f5979c8..796ea134a691 100644
@@ -285,29 +285,6 @@ extern int edac_device_add_device(struct edac_device_ctl_info *edac_dev);
  */
 extern struct edac_device_ctl_info *edac_device_del_device(struct device *dev);
 
-/**
- * edac_device_handle_ue():
- *	perform a common output and handling of an 'edac_dev' UE event
- *
- * @edac_dev: pointer to struct &edac_device_ctl_info
- * @inst_nr: number of the instance where the UE error happened
- * @block_nr: number of the block where the UE error happened
- * @msg: message to be printed
- */
-extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
-				int inst_nr, int block_nr, const char *msg);
-/**
- * edac_device_handle_ce():

drivers/edac/edac_device.h extern int edac_device_add_device(struct edac_device_ctl_info *edac_dev); · line 310

Quoted 10 lines
drivers/edac/edac_device.h +0 -10
- *	perform a common output and handling of an 'edac_dev' CE event
- *
- * @edac_dev: pointer to struct &edac_device_ctl_info
- * @inst_nr: number of the instance where the CE error happened
- * @block_nr: number of the block where the CE error happened
- * @msg: message to be printed
- */
-extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
-				int inst_nr, int block_nr, const char *msg);
-

Just put in the inline replacement here.

drivers/edac/edac_device.h static inline void edac_device_handle_ue_count(struct edac_device_ctl_info *edac · line 339

Quoted 10 lines
drivers/edac/edac_device.h +3 -0
 /**
  * edac_device_alloc_index: Allocate a unique device index number
  *
@@ -357,4 +334,18 @@ static inline void edac_device_handle_ue_count(struct edac_device_ctl_info *edac
 {
 	__edac_device_handle_ue(edac_dev, count, inst_nr, block_nr, msg);
 }
+
+static inline void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
+					 int inst_nr, int block_nr,

No need for this linebreak.

drivers/edac/edac_device.h static inline void edac_device_handle_ue_count(struct edac_device_ctl_info *edac · line 346

Quoted 7 lines
drivers/edac/edac_device.h +7 -0
+					 const char *msg)
+{
+	__edac_device_handle_ce(edac_dev, 1, inst_nr, block_nr, msg);
+}
+
+static inline void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
+					 int inst_nr, int block_nr,

Same here.

Quoted 8 lines
drivers/edac/edac_device.h +4 -0
+					 const char *msg)
+{
+	__edac_device_handle_ue(edac_dev, 1, inst_nr, block_nr, msg);
+}
 #endif
Signature · 1 line
2.17.1
#7 lore raw

Re: [PATCH v3 2/2] edac: move edac_device_handle_*() API functions to header

Quoted 39 lines · Robert Richter
Quoted 4 lines · Hanna Hawa

Move edac_device_handle_*() functions from source file to header file as inline funtcion that use the new API with single error.

With the changes below it looks good to me:

Thanks,

-Robert

Quoted 25 lines
drivers/edac/edac_device.h +0 -17
index 30dc5f5979c8..796ea134a691 100644
@@ -285,29 +285,6 @@ extern int edac_device_add_device(struct edac_device_ctl_info *edac_dev);
   */
  extern struct edac_device_ctl_info *edac_device_del_device(struct device *dev);
 
-/**
- * edac_device_handle_ue():
- *	perform a common output and handling of an 'edac_dev' UE event
- *
- * @edac_dev: pointer to struct &edac_device_ctl_info
- * @inst_nr: number of the instance where the UE error happened
- * @block_nr: number of the block where the UE error happened
- * @msg: message to be printed
- */
-extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
-				int inst_nr, int block_nr, const char *msg);
-/**
- * edac_device_handle_ce():
- *	perform a common output and handling of an 'edac_dev' CE event
- *
- * @edac_dev: pointer to struct &edac_device_ctl_info
- * @inst_nr: number of the instance where the CE error happened
Quoted 8 lines

drivers/edac/edac_device.h extern int edac_device_add_device(struct edac_device_ctl_info *edac_dev); · line 310

Quoted 6 lines
drivers/edac/edac_device.h +0 -6
- * @block_nr: number of the block where the CE error happened
- * @msg: message to be printed
- */
-extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
-				int inst_nr, int block_nr, const char *msg);
-

Just put in the inline replacement here.

I'll re-arrange the functions in patches 1/2 and put the *edac_device_handle_* functions here instead of end of file.

Quoted 13 lines

drivers/edac/edac_device.h static inline void edac_device_handle_ue_count(struct edac_device_ctl_info *edac · line 339

Quoted 11 lines
drivers/edac/edac_device.h +3 -0
  /**
   * edac_device_alloc_index: Allocate a unique device index number
   *
@@ -357,4 +334,18 @@ static inline void edac_device_handle_ue_count(struct edac_device_ctl_info *edac
  {
  	__edac_device_handle_ue(edac_dev, count, inst_nr, block_nr, msg);
  }
+
+static inline void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
+					 int inst_nr, int block_nr,

No need for this linebreak.

It'll be more than 80 characters.

Quoted 19 lines

drivers/edac/edac_device.h static inline void edac_device_handle_ue_count(struct edac_device_ctl_info *edac · line 346

Quoted 8 lines
drivers/edac/edac_device.h +7 -0
+					 const char *msg)
+{
+	__edac_device_handle_ce(edac_dev, 1, inst_nr, block_nr, msg);
+}
+
+static inline void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
+					 int inst_nr, int block_nr,

Same here.

Quoted 8 lines
drivers/edac/edac_device.h +4 -0
+					 const char *msg)
+{
+	__edac_device_handle_ue(edac_dev, 1, inst_nr, block_nr, msg);
+}
  #endif
Signature · 1 line
2.17.1