All of lore.kernel.org
 help / color / mirror / Atom feed
* arch/powerpc/sysdev/xive/common.c:1155:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
@ 2021-11-25 23:55 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-11-25 23:55 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5731 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Cédric Le Goater" <clg@kaod.org>
CC: Michael Ellerman <mpe@ellerman.id.au>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b501b85957deb17f1fe0a861fee820255519d526
commit: 7dcc37b3eff97379b194adb17eb9a8270512dd1d powerpc/xive: Map one IPI interrupt per node
date:   8 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 8 months ago
compiler: powerpc64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


vim +1155 arch/powerpc/sysdev/xive/common.c

7d348494136c8b4 Cédric Le Goater       2021-03-31  1115  
7d348494136c8b4 Cédric Le Goater       2021-03-31  1116  static int __init xive_request_ipi(void)
7d348494136c8b4 Cédric Le Goater       2021-03-31  1117  {
7d348494136c8b4 Cédric Le Goater       2021-03-31  1118  	struct fwnode_handle *fwnode;
7d348494136c8b4 Cédric Le Goater       2021-03-31  1119  	struct irq_domain *ipi_domain;
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1120  	unsigned int node;
7d348494136c8b4 Cédric Le Goater       2021-03-31  1121  	int ret = -ENOMEM;
243e25112d06b34 Benjamin Herrenschmidt 2017-04-05  1122  
7d348494136c8b4 Cédric Le Goater       2021-03-31  1123  	fwnode = irq_domain_alloc_named_fwnode("XIVE-IPI");
7d348494136c8b4 Cédric Le Goater       2021-03-31  1124  	if (!fwnode)
7d348494136c8b4 Cédric Le Goater       2021-03-31  1125  		goto out;
7d348494136c8b4 Cédric Le Goater       2021-03-31  1126  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1127  	ipi_domain = irq_domain_create_linear(fwnode, nr_node_ids,
7d348494136c8b4 Cédric Le Goater       2021-03-31  1128  					      &xive_ipi_irq_domain_ops, NULL);
7d348494136c8b4 Cédric Le Goater       2021-03-31  1129  	if (!ipi_domain)
7d348494136c8b4 Cédric Le Goater       2021-03-31  1130  		goto out_free_fwnode;
243e25112d06b34 Benjamin Herrenschmidt 2017-04-05  1131  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1132  	xive_ipis = kcalloc(nr_node_ids, sizeof(*xive_ipis), GFP_KERNEL | __GFP_NOFAIL);
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1133  	if (!xive_ipis)
7d348494136c8b4 Cédric Le Goater       2021-03-31  1134  		goto out_free_domain;
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1135  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1136  	for_each_node(node) {
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1137  		struct xive_ipi_desc *xid = &xive_ipis[node];
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1138  		irq_hw_number_t ipi_hwirq = node;
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1139  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1140  		/* Skip nodes without CPUs */
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1141  		if (cpumask_empty(cpumask_of_node(node)))
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1142  			continue;
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1143  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1144  		/*
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1145  		 * Map one IPI interrupt per node for all cpus of that node.
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1146  		 * Since the HW interrupt number doesn't have any meaning,
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1147  		 * simply use the node number.
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1148  		 */
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1149  		xid->irq = irq_create_mapping(ipi_domain, ipi_hwirq);
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1150  		if (!xid->irq) {
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1151  			ret = -EINVAL;
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1152  			goto out_free_xive_ipis;
7d348494136c8b4 Cédric Le Goater       2021-03-31  1153  		}
7d348494136c8b4 Cédric Le Goater       2021-03-31  1154  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31 @1155  		snprintf(xid->name, sizeof(xid->name), "IPI-%d", node);
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1156  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1157  		ret = request_irq(xid->irq, xive_muxed_ipi_action,
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1158  				  IRQF_PERCPU | IRQF_NO_THREAD, xid->name, NULL);
243e25112d06b34 Benjamin Herrenschmidt 2017-04-05  1159  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1160  		WARN(ret < 0, "Failed to request IPI %d: %d\n", xid->irq, ret);
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1161  	}
7d348494136c8b4 Cédric Le Goater       2021-03-31  1162  
7d348494136c8b4 Cédric Le Goater       2021-03-31  1163  	return ret;
7d348494136c8b4 Cédric Le Goater       2021-03-31  1164  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1165  out_free_xive_ipis:
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1166  	kfree(xive_ipis);
7d348494136c8b4 Cédric Le Goater       2021-03-31  1167  out_free_domain:
7d348494136c8b4 Cédric Le Goater       2021-03-31  1168  	irq_domain_remove(ipi_domain);
7d348494136c8b4 Cédric Le Goater       2021-03-31  1169  out_free_fwnode:
7d348494136c8b4 Cédric Le Goater       2021-03-31  1170  	irq_domain_free_fwnode(fwnode);
7d348494136c8b4 Cédric Le Goater       2021-03-31  1171  out:
7d348494136c8b4 Cédric Le Goater       2021-03-31  1172  	return ret;
243e25112d06b34 Benjamin Herrenschmidt 2017-04-05  1173  }
243e25112d06b34 Benjamin Herrenschmidt 2017-04-05  1174  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* arch/powerpc/sysdev/xive/common.c:1155:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
@ 2022-01-16  4:28 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-01-16  4:28 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5672 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Cédric Le Goater" <clg@kaod.org>
CC: Michael Ellerman <mpe@ellerman.id.au>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a33f5c380c4bd3fa5278d690421b72052456d9fe
commit: 7dcc37b3eff97379b194adb17eb9a8270512dd1d powerpc/xive: Map one IPI interrupt per node
date:   9 months ago
:::::: branch date: 23 hours ago
:::::: commit date: 9 months ago
compiler: powerpc64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


vim +1155 arch/powerpc/sysdev/xive/common.c

7d348494136c8b Cédric Le Goater       2021-03-31  1115  
7d348494136c8b Cédric Le Goater       2021-03-31  1116  static int __init xive_request_ipi(void)
7d348494136c8b Cédric Le Goater       2021-03-31  1117  {
7d348494136c8b Cédric Le Goater       2021-03-31  1118  	struct fwnode_handle *fwnode;
7d348494136c8b Cédric Le Goater       2021-03-31  1119  	struct irq_domain *ipi_domain;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1120  	unsigned int node;
7d348494136c8b Cédric Le Goater       2021-03-31  1121  	int ret = -ENOMEM;
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1122  
7d348494136c8b Cédric Le Goater       2021-03-31  1123  	fwnode = irq_domain_alloc_named_fwnode("XIVE-IPI");
7d348494136c8b Cédric Le Goater       2021-03-31  1124  	if (!fwnode)
7d348494136c8b Cédric Le Goater       2021-03-31  1125  		goto out;
7d348494136c8b Cédric Le Goater       2021-03-31  1126  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1127  	ipi_domain = irq_domain_create_linear(fwnode, nr_node_ids,
7d348494136c8b Cédric Le Goater       2021-03-31  1128  					      &xive_ipi_irq_domain_ops, NULL);
7d348494136c8b Cédric Le Goater       2021-03-31  1129  	if (!ipi_domain)
7d348494136c8b Cédric Le Goater       2021-03-31  1130  		goto out_free_fwnode;
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1131  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1132  	xive_ipis = kcalloc(nr_node_ids, sizeof(*xive_ipis), GFP_KERNEL | __GFP_NOFAIL);
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1133  	if (!xive_ipis)
7d348494136c8b Cédric Le Goater       2021-03-31  1134  		goto out_free_domain;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1135  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1136  	for_each_node(node) {
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1137  		struct xive_ipi_desc *xid = &xive_ipis[node];
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1138  		irq_hw_number_t ipi_hwirq = node;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1139  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1140  		/* Skip nodes without CPUs */
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1141  		if (cpumask_empty(cpumask_of_node(node)))
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1142  			continue;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1143  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1144  		/*
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1145  		 * Map one IPI interrupt per node for all cpus of that node.
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1146  		 * Since the HW interrupt number doesn't have any meaning,
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1147  		 * simply use the node number.
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1148  		 */
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1149  		xid->irq = irq_create_mapping(ipi_domain, ipi_hwirq);
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1150  		if (!xid->irq) {
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1151  			ret = -EINVAL;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1152  			goto out_free_xive_ipis;
7d348494136c8b Cédric Le Goater       2021-03-31  1153  		}
7d348494136c8b Cédric Le Goater       2021-03-31  1154  
7dcc37b3eff973 Cédric Le Goater       2021-03-31 @1155  		snprintf(xid->name, sizeof(xid->name), "IPI-%d", node);
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1156  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1157  		ret = request_irq(xid->irq, xive_muxed_ipi_action,
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1158  				  IRQF_PERCPU | IRQF_NO_THREAD, xid->name, NULL);
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1159  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1160  		WARN(ret < 0, "Failed to request IPI %d: %d\n", xid->irq, ret);
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1161  	}
7d348494136c8b Cédric Le Goater       2021-03-31  1162  
7d348494136c8b Cédric Le Goater       2021-03-31  1163  	return ret;
7d348494136c8b Cédric Le Goater       2021-03-31  1164  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1165  out_free_xive_ipis:
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1166  	kfree(xive_ipis);
7d348494136c8b Cédric Le Goater       2021-03-31  1167  out_free_domain:
7d348494136c8b Cédric Le Goater       2021-03-31  1168  	irq_domain_remove(ipi_domain);
7d348494136c8b Cédric Le Goater       2021-03-31  1169  out_free_fwnode:
7d348494136c8b Cédric Le Goater       2021-03-31  1170  	irq_domain_free_fwnode(fwnode);
7d348494136c8b Cédric Le Goater       2021-03-31  1171  out:
7d348494136c8b Cédric Le Goater       2021-03-31  1172  	return ret;
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1173  }
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1174  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* arch/powerpc/sysdev/xive/common.c:1155:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
@ 2022-01-29 13:48 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-01-29 13:48 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 6808 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Cédric Le Goater" <clg@kaod.org>
CC: Michael Ellerman <mpe@ellerman.id.au>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   169387e2aa291a4e3cb856053730fe99d6cec06f
commit: 7dcc37b3eff97379b194adb17eb9a8270512dd1d powerpc/xive: Map one IPI interrupt per node
date:   10 months ago
:::::: branch date: 18 hours ago
:::::: commit date: 10 months ago
compiler: powerpc64le-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/block/floppy.c:2525:4: warning: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg]
      max_sector -= remaining >> 9;
      ^
>> drivers/block/floppy.c:4014:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
      snprintf(temparea, sizeof(temparea),
      ^
   drivers/block/floppy.c:4607:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
     sprintf(disk->disk_name, "fd%d_type%d", drive, type);
     ^
   drivers/block/floppy.c:4607:3: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
     sprintf(disk->disk_name, "fd%d_type%d", drive, type);
     ^
   drivers/block/floppy.c:4609:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
     sprintf(disk->disk_name, "fd%d", drive);
     ^

vim +1155 arch/powerpc/sysdev/xive/common.c

7d348494136c8b Cédric Le Goater       2021-03-31  1115  
7d348494136c8b Cédric Le Goater       2021-03-31  1116  static int __init xive_request_ipi(void)
7d348494136c8b Cédric Le Goater       2021-03-31  1117  {
7d348494136c8b Cédric Le Goater       2021-03-31  1118  	struct fwnode_handle *fwnode;
7d348494136c8b Cédric Le Goater       2021-03-31  1119  	struct irq_domain *ipi_domain;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1120  	unsigned int node;
7d348494136c8b Cédric Le Goater       2021-03-31  1121  	int ret = -ENOMEM;
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1122  
7d348494136c8b Cédric Le Goater       2021-03-31  1123  	fwnode = irq_domain_alloc_named_fwnode("XIVE-IPI");
7d348494136c8b Cédric Le Goater       2021-03-31  1124  	if (!fwnode)
7d348494136c8b Cédric Le Goater       2021-03-31  1125  		goto out;
7d348494136c8b Cédric Le Goater       2021-03-31  1126  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1127  	ipi_domain = irq_domain_create_linear(fwnode, nr_node_ids,
7d348494136c8b Cédric Le Goater       2021-03-31  1128  					      &xive_ipi_irq_domain_ops, NULL);
7d348494136c8b Cédric Le Goater       2021-03-31  1129  	if (!ipi_domain)
7d348494136c8b Cédric Le Goater       2021-03-31  1130  		goto out_free_fwnode;
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1131  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1132  	xive_ipis = kcalloc(nr_node_ids, sizeof(*xive_ipis), GFP_KERNEL | __GFP_NOFAIL);
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1133  	if (!xive_ipis)
7d348494136c8b Cédric Le Goater       2021-03-31  1134  		goto out_free_domain;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1135  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1136  	for_each_node(node) {
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1137  		struct xive_ipi_desc *xid = &xive_ipis[node];
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1138  		irq_hw_number_t ipi_hwirq = node;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1139  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1140  		/* Skip nodes without CPUs */
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1141  		if (cpumask_empty(cpumask_of_node(node)))
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1142  			continue;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1143  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1144  		/*
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1145  		 * Map one IPI interrupt per node for all cpus of that node.
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1146  		 * Since the HW interrupt number doesn't have any meaning,
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1147  		 * simply use the node number.
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1148  		 */
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1149  		xid->irq = irq_create_mapping(ipi_domain, ipi_hwirq);
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1150  		if (!xid->irq) {
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1151  			ret = -EINVAL;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1152  			goto out_free_xive_ipis;
7d348494136c8b Cédric Le Goater       2021-03-31  1153  		}
7d348494136c8b Cédric Le Goater       2021-03-31  1154  
7dcc37b3eff973 Cédric Le Goater       2021-03-31 @1155  		snprintf(xid->name, sizeof(xid->name), "IPI-%d", node);
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1156  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1157  		ret = request_irq(xid->irq, xive_muxed_ipi_action,
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1158  				  IRQF_PERCPU | IRQF_NO_THREAD, xid->name, NULL);
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1159  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1160  		WARN(ret < 0, "Failed to request IPI %d: %d\n", xid->irq, ret);
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1161  	}
7d348494136c8b Cédric Le Goater       2021-03-31  1162  
7d348494136c8b Cédric Le Goater       2021-03-31  1163  	return ret;
7d348494136c8b Cédric Le Goater       2021-03-31  1164  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1165  out_free_xive_ipis:
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1166  	kfree(xive_ipis);
7d348494136c8b Cédric Le Goater       2021-03-31  1167  out_free_domain:
7d348494136c8b Cédric Le Goater       2021-03-31  1168  	irq_domain_remove(ipi_domain);
7d348494136c8b Cédric Le Goater       2021-03-31  1169  out_free_fwnode:
7d348494136c8b Cédric Le Goater       2021-03-31  1170  	irq_domain_free_fwnode(fwnode);
7d348494136c8b Cédric Le Goater       2021-03-31  1171  out:
7d348494136c8b Cédric Le Goater       2021-03-31  1172  	return ret;
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1173  }
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1174  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* arch/powerpc/sysdev/xive/common.c:1155:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
@ 2022-01-29 21:57 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-01-29 21:57 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 6867 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Cédric Le Goater" <clg@kaod.org>
CC: Michael Ellerman <mpe@ellerman.id.au>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cb323ee75d24e7acc2f188d123ba6df46159cf09
commit: 7dcc37b3eff97379b194adb17eb9a8270512dd1d powerpc/xive: Map one IPI interrupt per node
date:   10 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 10 months ago
compiler: powerpc64le-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/block/floppy.c:2525:4: warning: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg]
      max_sector -= remaining >> 9;
      ^
>> drivers/block/floppy.c:4014:4: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
      snprintf(temparea, sizeof(temparea),
      ^
   drivers/block/floppy.c:4607:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
     sprintf(disk->disk_name, "fd%d_type%d", drive, type);
     ^
   drivers/block/floppy.c:4607:3: warning: %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
     sprintf(disk->disk_name, "fd%d_type%d", drive, type);
     ^
   drivers/block/floppy.c:4609:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
     sprintf(disk->disk_name, "fd%d", drive);
     ^

vim +1155 arch/powerpc/sysdev/xive/common.c

7d348494136c8b4 Cédric Le Goater       2021-03-31  1115  
7d348494136c8b4 Cédric Le Goater       2021-03-31  1116  static int __init xive_request_ipi(void)
7d348494136c8b4 Cédric Le Goater       2021-03-31  1117  {
7d348494136c8b4 Cédric Le Goater       2021-03-31  1118  	struct fwnode_handle *fwnode;
7d348494136c8b4 Cédric Le Goater       2021-03-31  1119  	struct irq_domain *ipi_domain;
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1120  	unsigned int node;
7d348494136c8b4 Cédric Le Goater       2021-03-31  1121  	int ret = -ENOMEM;
243e25112d06b34 Benjamin Herrenschmidt 2017-04-05  1122  
7d348494136c8b4 Cédric Le Goater       2021-03-31  1123  	fwnode = irq_domain_alloc_named_fwnode("XIVE-IPI");
7d348494136c8b4 Cédric Le Goater       2021-03-31  1124  	if (!fwnode)
7d348494136c8b4 Cédric Le Goater       2021-03-31  1125  		goto out;
7d348494136c8b4 Cédric Le Goater       2021-03-31  1126  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1127  	ipi_domain = irq_domain_create_linear(fwnode, nr_node_ids,
7d348494136c8b4 Cédric Le Goater       2021-03-31  1128  					      &xive_ipi_irq_domain_ops, NULL);
7d348494136c8b4 Cédric Le Goater       2021-03-31  1129  	if (!ipi_domain)
7d348494136c8b4 Cédric Le Goater       2021-03-31  1130  		goto out_free_fwnode;
243e25112d06b34 Benjamin Herrenschmidt 2017-04-05  1131  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1132  	xive_ipis = kcalloc(nr_node_ids, sizeof(*xive_ipis), GFP_KERNEL | __GFP_NOFAIL);
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1133  	if (!xive_ipis)
7d348494136c8b4 Cédric Le Goater       2021-03-31  1134  		goto out_free_domain;
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1135  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1136  	for_each_node(node) {
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1137  		struct xive_ipi_desc *xid = &xive_ipis[node];
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1138  		irq_hw_number_t ipi_hwirq = node;
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1139  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1140  		/* Skip nodes without CPUs */
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1141  		if (cpumask_empty(cpumask_of_node(node)))
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1142  			continue;
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1143  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1144  		/*
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1145  		 * Map one IPI interrupt per node for all cpus of that node.
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1146  		 * Since the HW interrupt number doesn't have any meaning,
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1147  		 * simply use the node number.
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1148  		 */
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1149  		xid->irq = irq_create_mapping(ipi_domain, ipi_hwirq);
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1150  		if (!xid->irq) {
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1151  			ret = -EINVAL;
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1152  			goto out_free_xive_ipis;
7d348494136c8b4 Cédric Le Goater       2021-03-31  1153  		}
7d348494136c8b4 Cédric Le Goater       2021-03-31  1154  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31 @1155  		snprintf(xid->name, sizeof(xid->name), "IPI-%d", node);
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1156  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1157  		ret = request_irq(xid->irq, xive_muxed_ipi_action,
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1158  				  IRQF_PERCPU | IRQF_NO_THREAD, xid->name, NULL);
243e25112d06b34 Benjamin Herrenschmidt 2017-04-05  1159  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1160  		WARN(ret < 0, "Failed to request IPI %d: %d\n", xid->irq, ret);
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1161  	}
7d348494136c8b4 Cédric Le Goater       2021-03-31  1162  
7d348494136c8b4 Cédric Le Goater       2021-03-31  1163  	return ret;
7d348494136c8b4 Cédric Le Goater       2021-03-31  1164  
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1165  out_free_xive_ipis:
7dcc37b3eff9737 Cédric Le Goater       2021-03-31  1166  	kfree(xive_ipis);
7d348494136c8b4 Cédric Le Goater       2021-03-31  1167  out_free_domain:
7d348494136c8b4 Cédric Le Goater       2021-03-31  1168  	irq_domain_remove(ipi_domain);
7d348494136c8b4 Cédric Le Goater       2021-03-31  1169  out_free_fwnode:
7d348494136c8b4 Cédric Le Goater       2021-03-31  1170  	irq_domain_free_fwnode(fwnode);
7d348494136c8b4 Cédric Le Goater       2021-03-31  1171  out:
7d348494136c8b4 Cédric Le Goater       2021-03-31  1172  	return ret;
243e25112d06b34 Benjamin Herrenschmidt 2017-04-05  1173  }
243e25112d06b34 Benjamin Herrenschmidt 2017-04-05  1174  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* arch/powerpc/sysdev/xive/common.c:1155:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
@ 2022-03-27 23:22 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-03-27 23:22 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5632 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: "Cédric Le Goater" <clg@kaod.org>
CC: Michael Ellerman <mpe@ellerman.id.au>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   50d602d81f35621042fa0cdae25808662caffda8
commit: 7dcc37b3eff97379b194adb17eb9a8270512dd1d powerpc/xive: Map one IPI interrupt per node
date:   12 months ago
:::::: branch date: 2 hours ago
:::::: commit date: 12 months ago
compiler: powerpc64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


vim +1155 arch/powerpc/sysdev/xive/common.c

7d348494136c8b Cédric Le Goater       2021-03-31  1115  
7d348494136c8b Cédric Le Goater       2021-03-31  1116  static int __init xive_request_ipi(void)
7d348494136c8b Cédric Le Goater       2021-03-31  1117  {
7d348494136c8b Cédric Le Goater       2021-03-31  1118  	struct fwnode_handle *fwnode;
7d348494136c8b Cédric Le Goater       2021-03-31  1119  	struct irq_domain *ipi_domain;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1120  	unsigned int node;
7d348494136c8b Cédric Le Goater       2021-03-31  1121  	int ret = -ENOMEM;
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1122  
7d348494136c8b Cédric Le Goater       2021-03-31  1123  	fwnode = irq_domain_alloc_named_fwnode("XIVE-IPI");
7d348494136c8b Cédric Le Goater       2021-03-31  1124  	if (!fwnode)
7d348494136c8b Cédric Le Goater       2021-03-31  1125  		goto out;
7d348494136c8b Cédric Le Goater       2021-03-31  1126  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1127  	ipi_domain = irq_domain_create_linear(fwnode, nr_node_ids,
7d348494136c8b Cédric Le Goater       2021-03-31  1128  					      &xive_ipi_irq_domain_ops, NULL);
7d348494136c8b Cédric Le Goater       2021-03-31  1129  	if (!ipi_domain)
7d348494136c8b Cédric Le Goater       2021-03-31  1130  		goto out_free_fwnode;
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1131  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1132  	xive_ipis = kcalloc(nr_node_ids, sizeof(*xive_ipis), GFP_KERNEL | __GFP_NOFAIL);
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1133  	if (!xive_ipis)
7d348494136c8b Cédric Le Goater       2021-03-31  1134  		goto out_free_domain;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1135  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1136  	for_each_node(node) {
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1137  		struct xive_ipi_desc *xid = &xive_ipis[node];
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1138  		irq_hw_number_t ipi_hwirq = node;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1139  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1140  		/* Skip nodes without CPUs */
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1141  		if (cpumask_empty(cpumask_of_node(node)))
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1142  			continue;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1143  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1144  		/*
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1145  		 * Map one IPI interrupt per node for all cpus of that node.
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1146  		 * Since the HW interrupt number doesn't have any meaning,
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1147  		 * simply use the node number.
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1148  		 */
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1149  		xid->irq = irq_create_mapping(ipi_domain, ipi_hwirq);
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1150  		if (!xid->irq) {
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1151  			ret = -EINVAL;
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1152  			goto out_free_xive_ipis;
7d348494136c8b Cédric Le Goater       2021-03-31  1153  		}
7d348494136c8b Cédric Le Goater       2021-03-31  1154  
7dcc37b3eff973 Cédric Le Goater       2021-03-31 @1155  		snprintf(xid->name, sizeof(xid->name), "IPI-%d", node);
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1156  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1157  		ret = request_irq(xid->irq, xive_muxed_ipi_action,
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1158  				  IRQF_PERCPU | IRQF_NO_THREAD, xid->name, NULL);
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1159  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1160  		WARN(ret < 0, "Failed to request IPI %d: %d\n", xid->irq, ret);
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1161  	}
7d348494136c8b Cédric Le Goater       2021-03-31  1162  
7d348494136c8b Cédric Le Goater       2021-03-31  1163  	return ret;
7d348494136c8b Cédric Le Goater       2021-03-31  1164  
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1165  out_free_xive_ipis:
7dcc37b3eff973 Cédric Le Goater       2021-03-31  1166  	kfree(xive_ipis);
7d348494136c8b Cédric Le Goater       2021-03-31  1167  out_free_domain:
7d348494136c8b Cédric Le Goater       2021-03-31  1168  	irq_domain_remove(ipi_domain);
7d348494136c8b Cédric Le Goater       2021-03-31  1169  out_free_fwnode:
7d348494136c8b Cédric Le Goater       2021-03-31  1170  	irq_domain_free_fwnode(fwnode);
7d348494136c8b Cédric Le Goater       2021-03-31  1171  out:
7d348494136c8b Cédric Le Goater       2021-03-31  1172  	return ret;
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1173  }
243e25112d06b3 Benjamin Herrenschmidt 2017-04-05  1174  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-27 23:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-29 13:48 arch/powerpc/sysdev/xive/common.c:1155:3: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-03-27 23:22 kernel test robot
2022-01-29 21:57 kernel test robot
2022-01-16  4:28 kernel test robot
2021-11-25 23:55 kernel test robot

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.