lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 8 Jan 2021 08:16:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Michael Ellerman <mpe@...erman.id.au>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: drivers/usb/host/ohci-ppc-of.c:167 ohci_hcd_ppc_of_probe() warn:
 inconsistent indenting

Hi Michael,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62
commit: e02152ba2810f7c88cb54e71cda096268dfa9241 powerpc: Drop -me200 addition to build flags
date:   7 weeks ago
config: powerpc64-randconfig-m031-20210106 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0

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

New smatch warnings:
drivers/usb/host/ohci-ppc-of.c:167 ohci_hcd_ppc_of_probe() warn: inconsistent indenting
fs/f2fs/compress.c:234 lzo_decompress_pages() warn: should '(1 << 12) << dic->log_cluster_size' be a 64 bit type?
fs/f2fs/compress.c:465 zstd_decompress_pages() warn: should '(1 << 12) << dic->log_cluster_size' be a 64 bit type?

Old smatch warnings:
fs/f2fs/compress.c:1134 f2fs_truncate_partial_cluster() warn: should 'rpages[i]->index << 12' be a 64 bit type?

vim +167 drivers/usb/host/ohci-ppc-of.c

495a678fc62e850 Sylvain Munaut    2006-12-13   85  
495a678fc62e850 Sylvain Munaut    2006-12-13   86  
41ac7b3ab7fe1d6 Bill Pemberton    2012-11-19   87  static int ohci_hcd_ppc_of_probe(struct platform_device *op)
495a678fc62e850 Sylvain Munaut    2006-12-13   88  {
61c7a080a5a061c Grant Likely      2010-04-13   89  	struct device_node *dn = op->dev.of_node;
495a678fc62e850 Sylvain Munaut    2006-12-13   90  	struct usb_hcd *hcd;
495a678fc62e850 Sylvain Munaut    2006-12-13   91  	struct ohci_hcd	*ohci;
495a678fc62e850 Sylvain Munaut    2006-12-13   92  	struct resource res;
495a678fc62e850 Sylvain Munaut    2006-12-13   93  	int irq;
495a678fc62e850 Sylvain Munaut    2006-12-13   94  
495a678fc62e850 Sylvain Munaut    2006-12-13   95  	int rv;
495a678fc62e850 Sylvain Munaut    2006-12-13   96  	int is_bigendian;
796bcae7361c28c Vitaly Bordug     2008-11-09   97  	struct device_node *np;
495a678fc62e850 Sylvain Munaut    2006-12-13   98  
495a678fc62e850 Sylvain Munaut    2006-12-13   99  	if (usb_disabled())
495a678fc62e850 Sylvain Munaut    2006-12-13  100  		return -ENODEV;
495a678fc62e850 Sylvain Munaut    2006-12-13  101  
495a678fc62e850 Sylvain Munaut    2006-12-13  102  	is_bigendian =
55b61fec22caa3e Stephen Rothwell  2007-05-03  103  		of_device_is_compatible(dn, "ohci-bigendian") ||
55b61fec22caa3e Stephen Rothwell  2007-05-03  104  		of_device_is_compatible(dn, "ohci-be");
495a678fc62e850 Sylvain Munaut    2006-12-13  105  
495a678fc62e850 Sylvain Munaut    2006-12-13  106  	dev_dbg(&op->dev, "initializing PPC-OF USB Controller\n");
495a678fc62e850 Sylvain Munaut    2006-12-13  107  
495a678fc62e850 Sylvain Munaut    2006-12-13  108  	rv = of_address_to_resource(dn, 0, &res);
495a678fc62e850 Sylvain Munaut    2006-12-13  109  	if (rv)
495a678fc62e850 Sylvain Munaut    2006-12-13  110  		return rv;
495a678fc62e850 Sylvain Munaut    2006-12-13  111  
495a678fc62e850 Sylvain Munaut    2006-12-13  112  	hcd = usb_create_hcd(&ohci_ppc_of_hc_driver, &op->dev, "PPC-OF USB");
495a678fc62e850 Sylvain Munaut    2006-12-13  113  	if (!hcd)
495a678fc62e850 Sylvain Munaut    2006-12-13  114  		return -ENOMEM;
495a678fc62e850 Sylvain Munaut    2006-12-13  115  
495a678fc62e850 Sylvain Munaut    2006-12-13  116  	hcd->rsrc_start = res.start;
28f65c11f2ffb39 Joe Perches       2011-06-09  117  	hcd->rsrc_len = resource_size(&res);
495a678fc62e850 Sylvain Munaut    2006-12-13  118  
3e2e714e7d6cf85 Jingoo Han        2013-12-11  119  	hcd->regs = devm_ioremap_resource(&op->dev, &res);
3e2e714e7d6cf85 Jingoo Han        2013-12-11  120  	if (IS_ERR(hcd->regs)) {
3e2e714e7d6cf85 Jingoo Han        2013-12-11  121  		rv = PTR_ERR(hcd->regs);
495a678fc62e850 Sylvain Munaut    2006-12-13  122  		goto err_rmr;
495a678fc62e850 Sylvain Munaut    2006-12-13  123  	}
495a678fc62e850 Sylvain Munaut    2006-12-13  124  
495a678fc62e850 Sylvain Munaut    2006-12-13  125  	irq = irq_of_parse_and_map(dn, 0);
495a678fc62e850 Sylvain Munaut    2006-12-13  126  	if (irq == NO_IRQ) {
63c9b9d3fe3b1b3 Jingoo Han        2013-12-10  127  		dev_err(&op->dev, "%s: irq_of_parse_and_map failed\n",
63c9b9d3fe3b1b3 Jingoo Han        2013-12-10  128  			__FILE__);
495a678fc62e850 Sylvain Munaut    2006-12-13  129  		rv = -EBUSY;
3e2e714e7d6cf85 Jingoo Han        2013-12-11  130  		goto err_rmr;
495a678fc62e850 Sylvain Munaut    2006-12-13  131  	}
495a678fc62e850 Sylvain Munaut    2006-12-13  132  
495a678fc62e850 Sylvain Munaut    2006-12-13  133  	ohci = hcd_to_ohci(hcd);
4f45426cfd61703 Valentine Barshak 2007-10-09  134  	if (is_bigendian) {
495a678fc62e850 Sylvain Munaut    2006-12-13  135  		ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC;
66ffbe490b61568 Grant Likely      2008-01-24  136  		if (of_device_is_compatible(dn, "fsl,mpc5200-ohci"))
66ffbe490b61568 Grant Likely      2008-01-24  137  			ohci->flags |= OHCI_QUIRK_FRAME_NO;
4f45426cfd61703 Valentine Barshak 2007-10-09  138  		if (of_device_is_compatible(dn, "mpc5200-ohci"))
4f45426cfd61703 Valentine Barshak 2007-10-09  139  			ohci->flags |= OHCI_QUIRK_FRAME_NO;
4f45426cfd61703 Valentine Barshak 2007-10-09  140  	}
495a678fc62e850 Sylvain Munaut    2006-12-13  141  
495a678fc62e850 Sylvain Munaut    2006-12-13  142  	ohci_hcd_init(ohci);
495a678fc62e850 Sylvain Munaut    2006-12-13  143  
b5dd18d8747010e Yong Zhang        2011-09-07  144  	rv = usb_add_hcd(hcd, irq, 0);
3c9740a117d40a7 Peter Chen        2013-11-05  145  	if (rv == 0) {
3c9740a117d40a7 Peter Chen        2013-11-05  146  		device_wakeup_enable(hcd->self.controller);
495a678fc62e850 Sylvain Munaut    2006-12-13  147  		return 0;
3c9740a117d40a7 Peter Chen        2013-11-05  148  	}
495a678fc62e850 Sylvain Munaut    2006-12-13  149  
796bcae7361c28c Vitaly Bordug     2008-11-09  150  	/* by now, 440epx is known to show usb_23 erratum */
796bcae7361c28c Vitaly Bordug     2008-11-09  151  	np = of_find_compatible_node(NULL, NULL, "ibm,usb-ehci-440epx");
796bcae7361c28c Vitaly Bordug     2008-11-09  152  
796bcae7361c28c Vitaly Bordug     2008-11-09  153  	/* Work around - At this point ohci_run has executed, the
796bcae7361c28c Vitaly Bordug     2008-11-09  154  	* controller is running, everything, the root ports, etc., is
796bcae7361c28c Vitaly Bordug     2008-11-09  155  	* set up.  If the ehci driver is loaded, put the ohci core in
796bcae7361c28c Vitaly Bordug     2008-11-09  156  	* the suspended state.  The ehci driver will bring it out of
796bcae7361c28c Vitaly Bordug     2008-11-09  157  	* suspended state when / if a non-high speed USB device is
796bcae7361c28c Vitaly Bordug     2008-11-09  158  	* attached to the USB Host port.  If the ehci driver is not
796bcae7361c28c Vitaly Bordug     2008-11-09  159  	* loaded, do nothing. request_mem_region is used to test if
796bcae7361c28c Vitaly Bordug     2008-11-09  160  	* the ehci driver is loaded.
796bcae7361c28c Vitaly Bordug     2008-11-09  161  	*/
796bcae7361c28c Vitaly Bordug     2008-11-09  162  	if (np !=  NULL) {
796bcae7361c28c Vitaly Bordug     2008-11-09  163  		if (!of_address_to_resource(np, 0, &res)) {
796bcae7361c28c Vitaly Bordug     2008-11-09  164  			if (!request_mem_region(res.start, 0x4, hcd_name)) {
796bcae7361c28c Vitaly Bordug     2008-11-09  165  				writel_be((readl_be(&ohci->regs->control) |
796bcae7361c28c Vitaly Bordug     2008-11-09  166  					OHCI_USB_SUSPEND), &ohci->regs->control);
796bcae7361c28c Vitaly Bordug     2008-11-09 @167  					(void) readl_be(&ohci->regs->control);
796bcae7361c28c Vitaly Bordug     2008-11-09  168  			} else
796bcae7361c28c Vitaly Bordug     2008-11-09  169  				release_mem_region(res.start, 0x4);
796bcae7361c28c Vitaly Bordug     2008-11-09  170  		} else
f45ba776da4fe6c Joe Perches       2010-02-05  171  			pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__);
796bcae7361c28c Vitaly Bordug     2008-11-09  172  	}
796bcae7361c28c Vitaly Bordug     2008-11-09  173  
495a678fc62e850 Sylvain Munaut    2006-12-13  174  	irq_dispose_mapping(irq);
495a678fc62e850 Sylvain Munaut    2006-12-13  175  err_rmr:
495a678fc62e850 Sylvain Munaut    2006-12-13  176   	usb_put_hcd(hcd);
495a678fc62e850 Sylvain Munaut    2006-12-13  177  
495a678fc62e850 Sylvain Munaut    2006-12-13  178  	return rv;
495a678fc62e850 Sylvain Munaut    2006-12-13  179  }
495a678fc62e850 Sylvain Munaut    2006-12-13  180  

:::::: The code at line 167 was first introduced by commit
:::::: 796bcae7361c28cf825780f6f1aac9dd3411394e USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]

:::::: TO: Vitaly Bordug <vitb@...nel.crashing.org>
:::::: CC: Greg Kroah-Hartman <gregkh@...e.de>

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

Download attachment ".config.gz" of type "application/gzip" (37871 bytes)

Powered by blists - more mailing lists