-
Notifications
You must be signed in to change notification settings - Fork 54.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update bcm4709-netgear-r8000.dts #319
base: master
Are you sure you want to change the base?
Conversation
Including missing WAN GPIO and LED Switch.
Please see:
|
lkl: add LKL_HIJACK_SYSCTL to configure sysctl values
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
Fix checkpatch errors: ERROR: else should follow close brace '}' torvalds#121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters torvalds#150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: + pinfo->tx_fifosize), (void __force *)pinfo->mem_addr, WARNING: Block comments should align the * on each line torvalds#66: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:66: + * Check, if transmit buffers are processed +*/ WARNING: braces {} are not necessary for any arm of this statement torvalds#170: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:170: + if (IS_SMC(pinfo)) { [...] + } else { [...] WARNING: labels should not be indented torvalds#292: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:292: + error_return: ERROR: code indent should use tabs where possible torvalds#299: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:299: +^I^I BD_SC_OV | BD_SC_ID);$ WARNING: labels should not be indented torvalds#319: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:319: + handle_error: WARNING: line over 80 characters torvalds#423: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:423: + setbits32(&pinfo->sccp->scc_gsmrl, (SCC_GSMRL_ENR | SCC_GSMRL_ENT)); ERROR: space required before the open parenthesis '(' torvalds#451: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:451: + while(!cpm_uart_tx_empty(port)) { WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, SMCMR_REN | SMCMR_TEN); WARNING: line over 80 characters torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#466: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:466: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: code indent should use tabs where possible torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ WARNING: please, no spaces at the start of a line torvalds#484: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:484: + struct ktermios *termios,$ ERROR: code indent should use tabs where possible torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: please, no spaces at the start of a line torvalds#485: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:485: + struct ktermios *old)$ WARNING: line over 80 characters torvalds#624: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:624: + /* Output in *one* operation, so we don't interrupt RX/TX if they WARNING: Block comments use a trailing */ on a separate line torvalds#625: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:625: + * were already enabled. */ WARNING: line over 80 characters torvalds#629: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:629: + out_be16(&pinfo->sccup->scc_genscc.scc_mrblr, pinfo->rx_fifosize); WARNING: line over 80 characters torvalds#773: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:773: + mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize); ERROR: code indent should use tabs where possible torvalds#797: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:797: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#799: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:799: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#836: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:836: +^I SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16);$ ERROR: code indent should use tabs where possible torvalds#859: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:859: +^I (u8 __iomem *)pinfo->rx_bd_base - DPRAM_BASE);$ ERROR: code indent should use tabs where possible torvalds#861: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:861: +^I (u8 __iomem *)pinfo->tx_bd_base - DPRAM_BASE);$ WARNING: space prohibited between function name and open parenthesis '(' torvalds#866: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:866: +#if defined (CONFIG_I2C_SPI_SMC1_UCODE_PATCH) WARNING: line over 80 characters torvalds#921: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:921: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); WARNING: Missing a blank line after declarations torvalds#462: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:462: + smc_t __iomem *smcp = pinfo->smcp; + clrbits16(&smcp->smc_smcmr, WARNING: Missing a blank line after declarations torvalds#467: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:467: + scc_t __iomem *sccp = pinfo->sccp; + clrbits32(&sccp->scc_gsmrl, ERROR: code indent should use tabs where possible #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line #1151: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1151: + struct uart_cpm_port *pinfo)$ ERROR: "(foo*)" should be "(foo *)" #1161: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1161: + struct clk *clk = clk_get(NULL, (const char*)data); WARNING: Missing a blank line after declarations #1162: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1162: + struct clk *clk = clk_get(NULL, (const char*)data); + if (!IS_ERR(clk)) ERROR: code indent should use tabs where possible #1169: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1169: +^I^I^I "fsl,cpm-brg property.\n", np);$ ERROR: code indent should use tabs where possible #1178: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1178: +^I^I "fsl,cpm-command property.\n", np);$ ERROR: code indent should use tabs where possible #1192: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1192: WARNING: braces {} are not necessary for any arm of this statement #1279: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1279: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: braces {} are not necessary for any arm of this statement #1287: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1287: + if (unlikely(nolock)) { [...] + } else { [...] WARNING: line over 80 characters #1354: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1354: + clrbits32(&pinfo->sccp->scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT); ERROR: Macros with complex values should be enclosed in parentheses #1394: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1394: +#define CPM_UART_CONSOLE &cpm_scc_uart_console WARNING: Missing a blank line after declarations #1437: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1437: + struct uart_cpm_port *pinfo = platform_get_drvdata(ofdev); + return uart_remove_one_port(&cpm_reg, &pinfo->port); WARNING: please, no spaces at the start of a line #1464: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1464: + };$ WARNING: Missing a blank line after declarations #1469: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1469: + int ret = uart_register_driver(&cpm_reg); + if (ret) WARNING: Missing a blank line after declarations torvalds#1062: FILE: drivers/tty/serial/cpm_uart/cpm_uart_core.c:1062: + int i; + volatile cbd_t *bdp; ERROR: "foo * bar" should be "foo *bar" torvalds#19: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:19: +static inline void cpm_set_scc_fcr(scc_uart_t __iomem * sup) ERROR: "foo * bar" should be "foo *bar" torvalds#25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm1.h:25: +static inline void cpm_set_smc_fcr(smc_uart_t __iomem * up) WARNING: Improper SPDX comment style for 'drivers/tty/serial/cpm_uart/cpm_uart.h', please use '/*' instead #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #1: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:1: +// SPDX-License-Identifier: GPL-2.0 WARNING: Block comments use * on subsequent lines torvalds#106: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:106: +/* + virtual to phys transtalion ERROR: code indent should use tabs where possible torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#109: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:109: + struct uart_cpm_port *pinfo)$ ERROR: code indent should use tabs where possible torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ WARNING: please, no spaces at the start of a line torvalds#125: FILE: drivers/tty/serial/cpm_uart/cpm_uart.h:125: + struct uart_cpm_port *pinfo)$ Signed-off-by: Enrico Weigelt <[email protected]>
…format For incoming SCO connection with transparent coding format, alt setting of CVSD is getting applied instead of Transparent. Before fix: < HCI Command: Accept Synchron.. (0x01|0x0029) plen 21 #2196 [hci0] 321.342548 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Transmit bandwidth: 8000 Receive bandwidth: 8000 Max latency: 13 Setting: 0x0003 Input Coding: Linear Input Data Format: 1's complement Input Sample Size: 8-bit # of bits padding at MSB: 0 Air Coding Format: Transparent Data Retransmission effort: Optimize for link quality (0x02) Packet type: 0x003f HV1 may be used HV2 may be used HV3 may be used EV3 may be used EV4 may be used EV5 may be used > HCI Event: Command Status (0x0f) plen 4 #2197 [hci0] 321.343585 Accept Synchronous Connection Request (0x01|0x0029) ncmd 1 Status: Success (0x00) > HCI Event: Synchronous Connect Comp.. (0x2c) plen 17 #2198 [hci0] 321.351666 Status: Success (0x00) Handle: 257 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Link type: eSCO (0x02) Transmission interval: 0x0c Retransmission window: 0x04 RX packet length: 60 TX packet length: 60 Air mode: Transparent (0x03) ........ > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2336 [hci0] 321.383655 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2337 [hci0] 321.389558 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2338 [hci0] 321.393615 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2339 [hci0] 321.393618 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2340 [hci0] 321.393618 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2341 [hci0] 321.397070 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2342 [hci0] 321.403622 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2343 [hci0] 321.403625 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2344 [hci0] 321.403625 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2345 [hci0] 321.403625 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2346 [hci0] 321.404569 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2347 [hci0] 321.412091 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2348 [hci0] 321.413626 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2349 [hci0] 321.413630 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2350 [hci0] 321.413630 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2351 [hci0] 321.419674 After fix: < HCI Command: Accept Synchronou.. (0x01|0x0029) plen 21 torvalds#309 [hci0] 49.439693 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Transmit bandwidth: 8000 Receive bandwidth: 8000 Max latency: 13 Setting: 0x0003 Input Coding: Linear Input Data Format: 1's complement Input Sample Size: 8-bit # of bits padding at MSB: 0 Air Coding Format: Transparent Data Retransmission effort: Optimize for link quality (0x02) Packet type: 0x003f HV1 may be used HV2 may be used HV3 may be used EV3 may be used EV4 may be used EV5 may be used > HCI Event: Command Status (0x0f) plen 4 torvalds#310 [hci0] 49.440308 Accept Synchronous Connection Request (0x01|0x0029) ncmd 1 Status: Success (0x00) > HCI Event: Synchronous Connect Complete (0x2c) plen 17 torvalds#311 [hci0] 49.449308 Status: Success (0x00) Handle: 257 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Link type: eSCO (0x02) Transmission interval: 0x0c Retransmission window: 0x04 RX packet length: 60 TX packet length: 60 Air mode: Transparent (0x03) < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#312 [hci0] 49.450421 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#313 [hci0] 49.457927 > HCI Event: Max Slots Change (0x1b) plen 3 torvalds#314 [hci0] 49.460345 Handle: 256 Max slots: 5 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#315 [hci0] 49.465453 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#316 [hci0] 49.470502 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#317 [hci0] 49.470519 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#318 [hci0] 49.472996 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#319 [hci0] 49.480412 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#320 [hci0] 49.480492 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#321 [hci0] 49.487989 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#322 [hci0] 49.490303 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#323 [hci0] 49.495496 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#324 [hci0] 49.500304 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#325 [hci0] 49.500311 Signed-off-by: Kiran K <[email protected]> Signed-off-by: Lokendra Singh <[email protected]>
…format For incoming SCO connection with transparent coding format, alt setting of CVSD is getting applied instead of Transparent. Before fix: < HCI Command: Accept Synchron.. (0x01|0x0029) plen 21 #2196 [hci0] 321.342548 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Transmit bandwidth: 8000 Receive bandwidth: 8000 Max latency: 13 Setting: 0x0003 Input Coding: Linear Input Data Format: 1's complement Input Sample Size: 8-bit # of bits padding at MSB: 0 Air Coding Format: Transparent Data Retransmission effort: Optimize for link quality (0x02) Packet type: 0x003f HV1 may be used HV2 may be used HV3 may be used EV3 may be used EV4 may be used EV5 may be used > HCI Event: Command Status (0x0f) plen 4 #2197 [hci0] 321.343585 Accept Synchronous Connection Request (0x01|0x0029) ncmd 1 Status: Success (0x00) > HCI Event: Synchronous Connect Comp.. (0x2c) plen 17 #2198 [hci0] 321.351666 Status: Success (0x00) Handle: 257 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Link type: eSCO (0x02) Transmission interval: 0x0c Retransmission window: 0x04 RX packet length: 60 TX packet length: 60 Air mode: Transparent (0x03) ........ > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2336 [hci0] 321.383655 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2337 [hci0] 321.389558 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2338 [hci0] 321.393615 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2339 [hci0] 321.393618 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2340 [hci0] 321.393618 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2341 [hci0] 321.397070 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2342 [hci0] 321.403622 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2343 [hci0] 321.403625 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2344 [hci0] 321.403625 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2345 [hci0] 321.403625 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2346 [hci0] 321.404569 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2347 [hci0] 321.412091 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2348 [hci0] 321.413626 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2349 [hci0] 321.413630 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2350 [hci0] 321.413630 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2351 [hci0] 321.419674 After fix: < HCI Command: Accept Synchronou.. (0x01|0x0029) plen 21 torvalds#309 [hci0] 49.439693 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Transmit bandwidth: 8000 Receive bandwidth: 8000 Max latency: 13 Setting: 0x0003 Input Coding: Linear Input Data Format: 1's complement Input Sample Size: 8-bit # of bits padding at MSB: 0 Air Coding Format: Transparent Data Retransmission effort: Optimize for link quality (0x02) Packet type: 0x003f HV1 may be used HV2 may be used HV3 may be used EV3 may be used EV4 may be used EV5 may be used > HCI Event: Command Status (0x0f) plen 4 torvalds#310 [hci0] 49.440308 Accept Synchronous Connection Request (0x01|0x0029) ncmd 1 Status: Success (0x00) > HCI Event: Synchronous Connect Complete (0x2c) plen 17 torvalds#311 [hci0] 49.449308 Status: Success (0x00) Handle: 257 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Link type: eSCO (0x02) Transmission interval: 0x0c Retransmission window: 0x04 RX packet length: 60 TX packet length: 60 Air mode: Transparent (0x03) < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#312 [hci0] 49.450421 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#313 [hci0] 49.457927 > HCI Event: Max Slots Change (0x1b) plen 3 torvalds#314 [hci0] 49.460345 Handle: 256 Max slots: 5 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#315 [hci0] 49.465453 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#316 [hci0] 49.470502 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#317 [hci0] 49.470519 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#318 [hci0] 49.472996 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#319 [hci0] 49.480412 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#320 [hci0] 49.480492 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#321 [hci0] 49.487989 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#322 [hci0] 49.490303 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#323 [hci0] 49.495496 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#324 [hci0] 49.500304 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#325 [hci0] 49.500311 Signed-off-by: Kiran K <[email protected]> Signed-off-by: Lokendra Singh <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
…format For incoming SCO connection with transparent coding format, alt setting of CVSD is getting applied instead of Transparent. Before fix: < HCI Command: Accept Synchron.. (0x01|0x0029) plen 21 #2196 [hci0] 321.342548 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Transmit bandwidth: 8000 Receive bandwidth: 8000 Max latency: 13 Setting: 0x0003 Input Coding: Linear Input Data Format: 1's complement Input Sample Size: 8-bit # of bits padding at MSB: 0 Air Coding Format: Transparent Data Retransmission effort: Optimize for link quality (0x02) Packet type: 0x003f HV1 may be used HV2 may be used HV3 may be used EV3 may be used EV4 may be used EV5 may be used > HCI Event: Command Status (0x0f) plen 4 #2197 [hci0] 321.343585 Accept Synchronous Connection Request (0x01|0x0029) ncmd 1 Status: Success (0x00) > HCI Event: Synchronous Connect Comp.. (0x2c) plen 17 #2198 [hci0] 321.351666 Status: Success (0x00) Handle: 257 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Link type: eSCO (0x02) Transmission interval: 0x0c Retransmission window: 0x04 RX packet length: 60 TX packet length: 60 Air mode: Transparent (0x03) ........ > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2336 [hci0] 321.383655 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2337 [hci0] 321.389558 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2338 [hci0] 321.393615 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2339 [hci0] 321.393618 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2340 [hci0] 321.393618 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2341 [hci0] 321.397070 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2342 [hci0] 321.403622 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2343 [hci0] 321.403625 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2344 [hci0] 321.403625 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2345 [hci0] 321.403625 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2346 [hci0] 321.404569 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2347 [hci0] 321.412091 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2348 [hci0] 321.413626 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2349 [hci0] 321.413630 > SCO Data RX: Handle 257 flags 0x00 dlen 48 #2350 [hci0] 321.413630 < SCO Data TX: Handle 257 flags 0x00 dlen 60 #2351 [hci0] 321.419674 After fix: < HCI Command: Accept Synchronou.. (0x01|0x0029) plen 21 torvalds#309 [hci0] 49.439693 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Transmit bandwidth: 8000 Receive bandwidth: 8000 Max latency: 13 Setting: 0x0003 Input Coding: Linear Input Data Format: 1's complement Input Sample Size: 8-bit # of bits padding at MSB: 0 Air Coding Format: Transparent Data Retransmission effort: Optimize for link quality (0x02) Packet type: 0x003f HV1 may be used HV2 may be used HV3 may be used EV3 may be used EV4 may be used EV5 may be used > HCI Event: Command Status (0x0f) plen 4 torvalds#310 [hci0] 49.440308 Accept Synchronous Connection Request (0x01|0x0029) ncmd 1 Status: Success (0x00) > HCI Event: Synchronous Connect Complete (0x2c) plen 17 torvalds#311 [hci0] 49.449308 Status: Success (0x00) Handle: 257 Address: 1C:CC:D6:E2:EA:80 (Xiaomi Communications Co Ltd) Link type: eSCO (0x02) Transmission interval: 0x0c Retransmission window: 0x04 RX packet length: 60 TX packet length: 60 Air mode: Transparent (0x03) < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#312 [hci0] 49.450421 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#313 [hci0] 49.457927 > HCI Event: Max Slots Change (0x1b) plen 3 torvalds#314 [hci0] 49.460345 Handle: 256 Max slots: 5 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#315 [hci0] 49.465453 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#316 [hci0] 49.470502 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#317 [hci0] 49.470519 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#318 [hci0] 49.472996 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#319 [hci0] 49.480412 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#320 [hci0] 49.480492 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#321 [hci0] 49.487989 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#322 [hci0] 49.490303 < SCO Data TX: Handle 257 flags 0x00 dlen 60 torvalds#323 [hci0] 49.495496 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#324 [hci0] 49.500304 > SCO Data RX: Handle 257 flags 0x00 dlen 60 torvalds#325 [hci0] 49.500311 Signed-off-by: Kiran K <[email protected]> Signed-off-by: Lokendra Singh <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
This reverts commit 4d4ac2e. When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out, and we can not make each lock a separate class because there can be more than MAX_LOCKDEP_SUBCLASSES of vqs. However, dropping the lock is harmless: 1. If dim is enabled, modifications made by dim worker to coalescing params may cause the user's query results to be dirty data. 2. In scenarios (a) and (b), a spurious dim worker is scheduled, but this can be handled correctly: (a) 1. dim is on 2. net_dim call schedules a worker 3. dim is turning off 4. The worker checks that dim is off and then exits after restoring dim's state. 5. The worker will not be scheduled until the next time dim is on. (b) 1. dim is on 2. net_dim call schedules a worker 3. The worker checks that dim is on and keeps going 4. dim is turning off 5. The worker successfully configure this parameter to the device. 6. The worker will not be scheduled until the next time dim is on. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: NipaLocal <nipa@local>
When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out. So refactoring the code to alleviate the problem. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]>
When the following snippet is run, lockdep will report a deadlock[1]. /* Acquire all queues dim_locks */ for (i = 0; i < vi->max_queue_pairs; i++) mutex_lock(&vi->rq[i].dim_lock); There's no deadlock here because the vq locks are always taken in the same order, but lockdep can not figure it out. So refactoring the code to alleviate the problem. [1] ======================================================== WARNING: possible recursive locking detected 6.9.0-rc7+ torvalds#319 Not tainted -------------------------------------------- ethtool/962 is trying to acquire lock: but task is already holding lock: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&vi->rq[i].dim_lock); lock(&vi->rq[i].dim_lock); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by ethtool/962: #0: ffffffff82dbaab0 (cb_lock){++++}-{3:3}, at: genl_rcv+0x19/0x40 #1: ffffffff82dad0a8 (rtnl_mutex){+.+.}-{3:3}, at: ethnl_default_set_doit+0xbe/0x1e0 stack backtrace: CPU: 6 PID: 962 Comm: ethtool Not tainted 6.9.0-rc7+ torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x79/0xb0 check_deadlock+0x130/0x220 __lock_acquire+0x861/0x990 lock_acquire.part.0+0x72/0x1d0 ? lock_acquire+0xf8/0x130 __mutex_lock+0x71/0xd50 virtnet_set_coalesce+0x151/0x190 __ethnl_set_coalesce.isra.0+0x3f8/0x4d0 ethnl_set_coalesce+0x34/0x90 ethnl_default_set_doit+0xdd/0x1e0 genl_family_rcv_msg_doit+0xdc/0x130 genl_family_rcv_msg+0x154/0x230 ? __pfx_ethnl_default_set_doit+0x10/0x10 genl_rcv_msg+0x4b/0xa0 ? __pfx_genl_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 genl_rcv+0x28/0x40 netlink_unicast+0x1af/0x280 netlink_sendmsg+0x20e/0x460 __sys_sendto+0x1fe/0x210 ? find_held_lock+0x2b/0x80 ? do_user_addr_fault+0x3a2/0x8a0 ? __lock_release+0x5e/0x160 ? do_user_addr_fault+0x3a2/0x8a0 ? lock_release+0x72/0x140 ? do_user_addr_fault+0x3a7/0x8a0 __x64_sys_sendto+0x29/0x30 do_syscall_64+0x78/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Fixes: 4d4ac2e ("virtio_net: Add a lock for per queue RX coalesce") Signed-off-by: Heng Qi <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Xuan Zhuo <[email protected]> Acked-by: Jason Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
[ Upstream commit 8ecf3c1 ] Recent additions in BPF like cpu v4 instructions, test_bpf module exhibits the following failures: test_bpf: torvalds#82 ALU_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#83 ALU_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#84 ALU64_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#85 ALU64_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#86 ALU64_MOVSX | BPF_W jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#165 ALU_SDIV_X: -6 / 2 = -3 jited:1 ret 2147483645 != -3 (0x7ffffffd != 0xfffffffd)FAIL (1 times) test_bpf: torvalds#166 ALU_SDIV_K: -6 / 2 = -3 jited:1 ret 2147483645 != -3 (0x7ffffffd != 0xfffffffd)FAIL (1 times) test_bpf: torvalds#169 ALU_SMOD_X: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) test_bpf: torvalds#170 ALU_SMOD_K: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) test_bpf: torvalds#172 ALU64_SMOD_K: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) test_bpf: torvalds#313 BSWAP 16: 0x0123456789abcdef -> 0xefcd eBPF filter opcode 00d7 (@2) unsupported jited:0 301 PASS test_bpf: torvalds#314 BSWAP 32: 0x0123456789abcdef -> 0xefcdab89 eBPF filter opcode 00d7 (@2) unsupported jited:0 555 PASS test_bpf: torvalds#315 BSWAP 64: 0x0123456789abcdef -> 0x67452301 eBPF filter opcode 00d7 (@2) unsupported jited:0 268 PASS test_bpf: torvalds#316 BSWAP 64: 0x0123456789abcdef >> 32 -> 0xefcdab89 eBPF filter opcode 00d7 (@2) unsupported jited:0 269 PASS test_bpf: torvalds#317 BSWAP 16: 0xfedcba9876543210 -> 0x1032 eBPF filter opcode 00d7 (@2) unsupported jited:0 460 PASS test_bpf: torvalds#318 BSWAP 32: 0xfedcba9876543210 -> 0x10325476 eBPF filter opcode 00d7 (@2) unsupported jited:0 320 PASS test_bpf: torvalds#319 BSWAP 64: 0xfedcba9876543210 -> 0x98badcfe eBPF filter opcode 00d7 (@2) unsupported jited:0 222 PASS test_bpf: torvalds#320 BSWAP 64: 0xfedcba9876543210 >> 32 -> 0x10325476 eBPF filter opcode 00d7 (@2) unsupported jited:0 273 PASS test_bpf: torvalds#344 BPF_LDX_MEMSX | BPF_B eBPF filter opcode 0091 (@5) unsupported jited:0 432 PASS test_bpf: torvalds#345 BPF_LDX_MEMSX | BPF_H eBPF filter opcode 0089 (@5) unsupported jited:0 381 PASS test_bpf: torvalds#346 BPF_LDX_MEMSX | BPF_W eBPF filter opcode 0081 (@5) unsupported jited:0 505 PASS test_bpf: torvalds#490 JMP32_JA: Unconditional jump: if (true) return 1 eBPF filter opcode 0006 (@1) unsupported jited:0 261 PASS test_bpf: Summary: 1040 PASSED, 10 FAILED, [924/1038 JIT'ed] Fix them by adding missing processing. Fixes: daabb2b ("bpf/tests: add tests for cpuv4 instructions") Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/91de862dda99d170697eb79ffb478678af7e0b27.1709652689.git.christophe.leroy@csgroup.eu Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8ecf3c1 ] Recent additions in BPF like cpu v4 instructions, test_bpf module exhibits the following failures: test_bpf: torvalds#82 ALU_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#83 ALU_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#84 ALU64_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#85 ALU64_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#86 ALU64_MOVSX | BPF_W jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#165 ALU_SDIV_X: -6 / 2 = -3 jited:1 ret 2147483645 != -3 (0x7ffffffd != 0xfffffffd)FAIL (1 times) test_bpf: torvalds#166 ALU_SDIV_K: -6 / 2 = -3 jited:1 ret 2147483645 != -3 (0x7ffffffd != 0xfffffffd)FAIL (1 times) test_bpf: torvalds#169 ALU_SMOD_X: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) test_bpf: torvalds#170 ALU_SMOD_K: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) test_bpf: torvalds#172 ALU64_SMOD_K: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) test_bpf: torvalds#313 BSWAP 16: 0x0123456789abcdef -> 0xefcd eBPF filter opcode 00d7 (@2) unsupported jited:0 301 PASS test_bpf: torvalds#314 BSWAP 32: 0x0123456789abcdef -> 0xefcdab89 eBPF filter opcode 00d7 (@2) unsupported jited:0 555 PASS test_bpf: torvalds#315 BSWAP 64: 0x0123456789abcdef -> 0x67452301 eBPF filter opcode 00d7 (@2) unsupported jited:0 268 PASS test_bpf: torvalds#316 BSWAP 64: 0x0123456789abcdef >> 32 -> 0xefcdab89 eBPF filter opcode 00d7 (@2) unsupported jited:0 269 PASS test_bpf: torvalds#317 BSWAP 16: 0xfedcba9876543210 -> 0x1032 eBPF filter opcode 00d7 (@2) unsupported jited:0 460 PASS test_bpf: torvalds#318 BSWAP 32: 0xfedcba9876543210 -> 0x10325476 eBPF filter opcode 00d7 (@2) unsupported jited:0 320 PASS test_bpf: torvalds#319 BSWAP 64: 0xfedcba9876543210 -> 0x98badcfe eBPF filter opcode 00d7 (@2) unsupported jited:0 222 PASS test_bpf: torvalds#320 BSWAP 64: 0xfedcba9876543210 >> 32 -> 0x10325476 eBPF filter opcode 00d7 (@2) unsupported jited:0 273 PASS test_bpf: torvalds#344 BPF_LDX_MEMSX | BPF_B eBPF filter opcode 0091 (@5) unsupported jited:0 432 PASS test_bpf: torvalds#345 BPF_LDX_MEMSX | BPF_H eBPF filter opcode 0089 (@5) unsupported jited:0 381 PASS test_bpf: torvalds#346 BPF_LDX_MEMSX | BPF_W eBPF filter opcode 0081 (@5) unsupported jited:0 505 PASS test_bpf: torvalds#490 JMP32_JA: Unconditional jump: if (true) return 1 eBPF filter opcode 0006 (@1) unsupported jited:0 261 PASS test_bpf: Summary: 1040 PASSED, 10 FAILED, [924/1038 JIT'ed] Fix them by adding missing processing. Fixes: daabb2b ("bpf/tests: add tests for cpuv4 instructions") Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/91de862dda99d170697eb79ffb478678af7e0b27.1709652689.git.christophe.leroy@csgroup.eu Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 8ecf3c1 ] Recent additions in BPF like cpu v4 instructions, test_bpf module exhibits the following failures: test_bpf: torvalds#82 ALU_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#83 ALU_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#84 ALU64_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#85 ALU64_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#86 ALU64_MOVSX | BPF_W jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: torvalds#165 ALU_SDIV_X: -6 / 2 = -3 jited:1 ret 2147483645 != -3 (0x7ffffffd != 0xfffffffd)FAIL (1 times) test_bpf: torvalds#166 ALU_SDIV_K: -6 / 2 = -3 jited:1 ret 2147483645 != -3 (0x7ffffffd != 0xfffffffd)FAIL (1 times) test_bpf: torvalds#169 ALU_SMOD_X: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) test_bpf: torvalds#170 ALU_SMOD_K: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) test_bpf: torvalds#172 ALU64_SMOD_K: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) test_bpf: torvalds#313 BSWAP 16: 0x0123456789abcdef -> 0xefcd eBPF filter opcode 00d7 (@2) unsupported jited:0 301 PASS test_bpf: torvalds#314 BSWAP 32: 0x0123456789abcdef -> 0xefcdab89 eBPF filter opcode 00d7 (@2) unsupported jited:0 555 PASS test_bpf: torvalds#315 BSWAP 64: 0x0123456789abcdef -> 0x67452301 eBPF filter opcode 00d7 (@2) unsupported jited:0 268 PASS test_bpf: torvalds#316 BSWAP 64: 0x0123456789abcdef >> 32 -> 0xefcdab89 eBPF filter opcode 00d7 (@2) unsupported jited:0 269 PASS test_bpf: torvalds#317 BSWAP 16: 0xfedcba9876543210 -> 0x1032 eBPF filter opcode 00d7 (@2) unsupported jited:0 460 PASS test_bpf: torvalds#318 BSWAP 32: 0xfedcba9876543210 -> 0x10325476 eBPF filter opcode 00d7 (@2) unsupported jited:0 320 PASS test_bpf: torvalds#319 BSWAP 64: 0xfedcba9876543210 -> 0x98badcfe eBPF filter opcode 00d7 (@2) unsupported jited:0 222 PASS test_bpf: torvalds#320 BSWAP 64: 0xfedcba9876543210 >> 32 -> 0x10325476 eBPF filter opcode 00d7 (@2) unsupported jited:0 273 PASS test_bpf: torvalds#344 BPF_LDX_MEMSX | BPF_B eBPF filter opcode 0091 (@5) unsupported jited:0 432 PASS test_bpf: torvalds#345 BPF_LDX_MEMSX | BPF_H eBPF filter opcode 0089 (@5) unsupported jited:0 381 PASS test_bpf: torvalds#346 BPF_LDX_MEMSX | BPF_W eBPF filter opcode 0081 (@5) unsupported jited:0 505 PASS test_bpf: torvalds#490 JMP32_JA: Unconditional jump: if (true) return 1 eBPF filter opcode 0006 (@1) unsupported jited:0 261 PASS test_bpf: Summary: 1040 PASSED, 10 FAILED, [924/1038 JIT'ed] Fix them by adding missing processing. Fixes: daabb2b ("bpf/tests: add tests for cpuv4 instructions") Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/91de862dda99d170697eb79ffb478678af7e0b27.1709652689.git.christophe.leroy@csgroup.eu Signed-off-by: Sasha Levin <[email protected]>
BugLink: https://bugs.launchpad.net/bugs/2065400 [ Upstream commit a51cd6b ] In case when is64 == 1 in emit(A64_REV32(is64, dst, dst), ctx) the generated insn reverses byte order for both high and low 32-bit words, resuling in an incorrect swap as indicated by the jit test: [ 9757.262607] test_bpf: torvalds#312 BSWAP 16: 0x0123456789abcdef -> 0xefcd jited:1 8 PASS [ 9757.264435] test_bpf: torvalds#313 BSWAP 32: 0x0123456789abcdef -> 0xefcdab89 jited:1 ret 1460850314 != -271733879 (0x5712ce8a != 0xefcdab89)FAIL (1 times) [ 9757.266260] test_bpf: torvalds#314 BSWAP 64: 0x0123456789abcdef -> 0x67452301 jited:1 8 PASS [ 9757.268000] test_bpf: torvalds#315 BSWAP 64: 0x0123456789abcdef >> 32 -> 0xefcdab89 jited:1 8 PASS [ 9757.269686] test_bpf: torvalds#316 BSWAP 16: 0xfedcba9876543210 -> 0x1032 jited:1 8 PASS [ 9757.271380] test_bpf: torvalds#317 BSWAP 32: 0xfedcba9876543210 -> 0x10325476 jited:1 ret -1460850316 != 271733878 (0xa8ed3174 != 0x10325476)FAIL (1 times) [ 9757.273022] test_bpf: torvalds#318 BSWAP 64: 0xfedcba9876543210 -> 0x98badcfe jited:1 7 PASS [ 9757.274721] test_bpf: torvalds#319 BSWAP 64: 0xfedcba9876543210 >> 32 -> 0x10325476 jited:1 9 PASS Fix this by forcing 32bit variant of rev32. Fixes: 1104247 ("bpf, arm64: Support unconditional bswap") Signed-off-by: Artem Savkov <[email protected]> Tested-by: Puranjay Mohan <[email protected]> Acked-by: Puranjay Mohan <[email protected]> Acked-by: Xu Kuohai <[email protected]> Message-ID: <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Manuel Diewald <[email protected]> Signed-off-by: Roxana Nicolescu <[email protected]>
Commit 76d54bf ("nvme-tcp: don't access released socket during error recovery") added a mutex_lock() call for the queue->queue_lock in nvme_tcp_get_address(). However, the mutex_lock() races with mutex_destroy() in nvme_tcp_free_queue(), and causes the WARN below. DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 3 PID: 34077 at kernel/locking/mutex.c:587 __mutex_lock+0xcf0/0x1220 Modules linked in: nvmet_tcp nvmet nvme_tcp nvme_fabrics iw_cm ib_cm ib_core pktcdvd nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables qrtr sunrpc ppdev 9pnet_virtio 9pnet pcspkr netfs parport_pc parport e1000 i2c_piix4 i2c_smbus loop fuse nfnetlink zram bochs drm_vram_helper drm_ttm_helper ttm drm_kms_helper xfs drm sym53c8xx floppy nvme scsi_transport_spi nvme_core nvme_auth serio_raw ata_generic pata_acpi dm_multipath qemu_fw_cfg [last unloaded: ib_uverbs] CPU: 3 UID: 0 PID: 34077 Comm: udisksd Not tainted 6.11.0-rc7 #319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014 RIP: 0010:__mutex_lock+0xcf0/0x1220 Code: 08 84 d2 0f 85 c8 04 00 00 8b 15 ef b6 c8 01 85 d2 0f 85 78 f4 ff ff 48 c7 c6 20 93 ee af 48 c7 c7 60 91 ee af e8 f0 a7 6d fd <0f> 0b e9 5e f4 ff ff 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 RSP: 0018:ffff88811305f760 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff88812c652058 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001 RBP: ffff88811305f8b0 R08: 0000000000000001 R09: ffffed1075c36341 R10: ffff8883ae1b1a0b R11: 0000000000010498 R12: 0000000000000000 R13: 0000000000000000 R14: dffffc0000000000 R15: ffff88812c652058 FS: 00007f9713ae4980(0000) GS:ffff8883ae180000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcd78483c7c CR3: 0000000122c38000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? __warn.cold+0x5b/0x1af ? __mutex_lock+0xcf0/0x1220 ? report_bug+0x1ec/0x390 ? handle_bug+0x3c/0x80 ? exc_invalid_op+0x13/0x40 ? asm_exc_invalid_op+0x16/0x20 ? __mutex_lock+0xcf0/0x1220 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx___mutex_lock+0x10/0x10 ? __lock_acquire+0xd6a/0x59e0 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx_nvme_tcp_get_address+0x10/0x10 [nvme_tcp] nvme_sysfs_show_address+0x81/0xc0 [nvme_core] dev_attr_show+0x42/0x80 ? __asan_memset+0x1f/0x40 sysfs_kf_seq_show+0x1f0/0x370 seq_read_iter+0x2cb/0x1130 ? rw_verify_area+0x3b1/0x590 ? __mutex_lock+0x433/0x1220 vfs_read+0x6a6/0xa20 ? lockdep_hardirqs_on+0x78/0x100 ? __pfx_vfs_read+0x10/0x10 ksys_read+0xf7/0x1d0 ? __pfx_ksys_read+0x10/0x10 ? __x64_sys_openat+0x105/0x1d0 do_syscall_64+0x93/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? __pfx_ksys_read+0x10/0x10 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? do_syscall_64+0x9f/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f9713f55cfa Code: 55 48 89 e5 48 83 ec 20 48 89 55 e8 48 89 75 f0 89 7d f8 e8 e8 74 f8 ff 48 8b 55 e8 48 8b 75 f0 41 89 c0 8b 7d f8 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 2e 44 89 c7 48 89 45 f8 e8 42 75 f8 ff 48 8b RSP: 002b:00007ffd7f512e70 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000055c38f316859 RCX: 00007f9713f55cfa RDX: 0000000000000fff RSI: 00007ffd7f512eb0 RDI: 0000000000000011 RBP: 00007ffd7f512e90 R08: 0000000000000000 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 000055c38f317148 R13: 0000000000000000 R14: 00007f96f4004f30 R15: 000055c3b6b623c0 </TASK> The WARN is observed when the blktests test case nvme/014 is repeated with tcp transport. It is rare, and 200 times repeat is required to recreate in some test environments. To avoid the WARN, check the NVME_TCP_Q_LIVE flag before locking queue->queue_lock. The flag is cleared long time before the lock gets destroyed. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Signed-off-by: Keith Busch <[email protected]>
[ Upstream commit 782373b ] Commit 76d54bf ("nvme-tcp: don't access released socket during error recovery") added a mutex_lock() call for the queue->queue_lock in nvme_tcp_get_address(). However, the mutex_lock() races with mutex_destroy() in nvme_tcp_free_queue(), and causes the WARN below. DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 3 PID: 34077 at kernel/locking/mutex.c:587 __mutex_lock+0xcf0/0x1220 Modules linked in: nvmet_tcp nvmet nvme_tcp nvme_fabrics iw_cm ib_cm ib_core pktcdvd nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables qrtr sunrpc ppdev 9pnet_virtio 9pnet pcspkr netfs parport_pc parport e1000 i2c_piix4 i2c_smbus loop fuse nfnetlink zram bochs drm_vram_helper drm_ttm_helper ttm drm_kms_helper xfs drm sym53c8xx floppy nvme scsi_transport_spi nvme_core nvme_auth serio_raw ata_generic pata_acpi dm_multipath qemu_fw_cfg [last unloaded: ib_uverbs] CPU: 3 UID: 0 PID: 34077 Comm: udisksd Not tainted 6.11.0-rc7 torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014 RIP: 0010:__mutex_lock+0xcf0/0x1220 Code: 08 84 d2 0f 85 c8 04 00 00 8b 15 ef b6 c8 01 85 d2 0f 85 78 f4 ff ff 48 c7 c6 20 93 ee af 48 c7 c7 60 91 ee af e8 f0 a7 6d fd <0f> 0b e9 5e f4 ff ff 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 RSP: 0018:ffff88811305f760 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff88812c652058 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001 RBP: ffff88811305f8b0 R08: 0000000000000001 R09: ffffed1075c36341 R10: ffff8883ae1b1a0b R11: 0000000000010498 R12: 0000000000000000 R13: 0000000000000000 R14: dffffc0000000000 R15: ffff88812c652058 FS: 00007f9713ae4980(0000) GS:ffff8883ae180000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcd78483c7c CR3: 0000000122c38000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? __warn.cold+0x5b/0x1af ? __mutex_lock+0xcf0/0x1220 ? report_bug+0x1ec/0x390 ? handle_bug+0x3c/0x80 ? exc_invalid_op+0x13/0x40 ? asm_exc_invalid_op+0x16/0x20 ? __mutex_lock+0xcf0/0x1220 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx___mutex_lock+0x10/0x10 ? __lock_acquire+0xd6a/0x59e0 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx_nvme_tcp_get_address+0x10/0x10 [nvme_tcp] nvme_sysfs_show_address+0x81/0xc0 [nvme_core] dev_attr_show+0x42/0x80 ? __asan_memset+0x1f/0x40 sysfs_kf_seq_show+0x1f0/0x370 seq_read_iter+0x2cb/0x1130 ? rw_verify_area+0x3b1/0x590 ? __mutex_lock+0x433/0x1220 vfs_read+0x6a6/0xa20 ? lockdep_hardirqs_on+0x78/0x100 ? __pfx_vfs_read+0x10/0x10 ksys_read+0xf7/0x1d0 ? __pfx_ksys_read+0x10/0x10 ? __x64_sys_openat+0x105/0x1d0 do_syscall_64+0x93/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? __pfx_ksys_read+0x10/0x10 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? do_syscall_64+0x9f/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f9713f55cfa Code: 55 48 89 e5 48 83 ec 20 48 89 55 e8 48 89 75 f0 89 7d f8 e8 e8 74 f8 ff 48 8b 55 e8 48 8b 75 f0 41 89 c0 8b 7d f8 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 2e 44 89 c7 48 89 45 f8 e8 42 75 f8 ff 48 8b RSP: 002b:00007ffd7f512e70 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000055c38f316859 RCX: 00007f9713f55cfa RDX: 0000000000000fff RSI: 00007ffd7f512eb0 RDI: 0000000000000011 RBP: 00007ffd7f512e90 R08: 0000000000000000 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 000055c38f317148 R13: 0000000000000000 R14: 00007f96f4004f30 R15: 000055c3b6b623c0 </TASK> The WARN is observed when the blktests test case nvme/014 is repeated with tcp transport. It is rare, and 200 times repeat is required to recreate in some test environments. To avoid the WARN, check the NVME_TCP_Q_LIVE flag before locking queue->queue_lock. The flag is cleared long time before the lock gets destroyed. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 782373b ] Commit 76d54bf ("nvme-tcp: don't access released socket during error recovery") added a mutex_lock() call for the queue->queue_lock in nvme_tcp_get_address(). However, the mutex_lock() races with mutex_destroy() in nvme_tcp_free_queue(), and causes the WARN below. DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 3 PID: 34077 at kernel/locking/mutex.c:587 __mutex_lock+0xcf0/0x1220 Modules linked in: nvmet_tcp nvmet nvme_tcp nvme_fabrics iw_cm ib_cm ib_core pktcdvd nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables qrtr sunrpc ppdev 9pnet_virtio 9pnet pcspkr netfs parport_pc parport e1000 i2c_piix4 i2c_smbus loop fuse nfnetlink zram bochs drm_vram_helper drm_ttm_helper ttm drm_kms_helper xfs drm sym53c8xx floppy nvme scsi_transport_spi nvme_core nvme_auth serio_raw ata_generic pata_acpi dm_multipath qemu_fw_cfg [last unloaded: ib_uverbs] CPU: 3 UID: 0 PID: 34077 Comm: udisksd Not tainted 6.11.0-rc7 torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014 RIP: 0010:__mutex_lock+0xcf0/0x1220 Code: 08 84 d2 0f 85 c8 04 00 00 8b 15 ef b6 c8 01 85 d2 0f 85 78 f4 ff ff 48 c7 c6 20 93 ee af 48 c7 c7 60 91 ee af e8 f0 a7 6d fd <0f> 0b e9 5e f4 ff ff 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 RSP: 0018:ffff88811305f760 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff88812c652058 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001 RBP: ffff88811305f8b0 R08: 0000000000000001 R09: ffffed1075c36341 R10: ffff8883ae1b1a0b R11: 0000000000010498 R12: 0000000000000000 R13: 0000000000000000 R14: dffffc0000000000 R15: ffff88812c652058 FS: 00007f9713ae4980(0000) GS:ffff8883ae180000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcd78483c7c CR3: 0000000122c38000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? __warn.cold+0x5b/0x1af ? __mutex_lock+0xcf0/0x1220 ? report_bug+0x1ec/0x390 ? handle_bug+0x3c/0x80 ? exc_invalid_op+0x13/0x40 ? asm_exc_invalid_op+0x16/0x20 ? __mutex_lock+0xcf0/0x1220 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx___mutex_lock+0x10/0x10 ? __lock_acquire+0xd6a/0x59e0 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx_nvme_tcp_get_address+0x10/0x10 [nvme_tcp] nvme_sysfs_show_address+0x81/0xc0 [nvme_core] dev_attr_show+0x42/0x80 ? __asan_memset+0x1f/0x40 sysfs_kf_seq_show+0x1f0/0x370 seq_read_iter+0x2cb/0x1130 ? rw_verify_area+0x3b1/0x590 ? __mutex_lock+0x433/0x1220 vfs_read+0x6a6/0xa20 ? lockdep_hardirqs_on+0x78/0x100 ? __pfx_vfs_read+0x10/0x10 ksys_read+0xf7/0x1d0 ? __pfx_ksys_read+0x10/0x10 ? __x64_sys_openat+0x105/0x1d0 do_syscall_64+0x93/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? __pfx_ksys_read+0x10/0x10 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? do_syscall_64+0x9f/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f9713f55cfa Code: 55 48 89 e5 48 83 ec 20 48 89 55 e8 48 89 75 f0 89 7d f8 e8 e8 74 f8 ff 48 8b 55 e8 48 8b 75 f0 41 89 c0 8b 7d f8 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 2e 44 89 c7 48 89 45 f8 e8 42 75 f8 ff 48 8b RSP: 002b:00007ffd7f512e70 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000055c38f316859 RCX: 00007f9713f55cfa RDX: 0000000000000fff RSI: 00007ffd7f512eb0 RDI: 0000000000000011 RBP: 00007ffd7f512e90 R08: 0000000000000000 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 000055c38f317148 R13: 0000000000000000 R14: 00007f96f4004f30 R15: 000055c3b6b623c0 </TASK> The WARN is observed when the blktests test case nvme/014 is repeated with tcp transport. It is rare, and 200 times repeat is required to recreate in some test environments. To avoid the WARN, check the NVME_TCP_Q_LIVE flag before locking queue->queue_lock. The flag is cleared long time before the lock gets destroyed. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 782373b ] Commit 76d54bf ("nvme-tcp: don't access released socket during error recovery") added a mutex_lock() call for the queue->queue_lock in nvme_tcp_get_address(). However, the mutex_lock() races with mutex_destroy() in nvme_tcp_free_queue(), and causes the WARN below. DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 3 PID: 34077 at kernel/locking/mutex.c:587 __mutex_lock+0xcf0/0x1220 Modules linked in: nvmet_tcp nvmet nvme_tcp nvme_fabrics iw_cm ib_cm ib_core pktcdvd nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables qrtr sunrpc ppdev 9pnet_virtio 9pnet pcspkr netfs parport_pc parport e1000 i2c_piix4 i2c_smbus loop fuse nfnetlink zram bochs drm_vram_helper drm_ttm_helper ttm drm_kms_helper xfs drm sym53c8xx floppy nvme scsi_transport_spi nvme_core nvme_auth serio_raw ata_generic pata_acpi dm_multipath qemu_fw_cfg [last unloaded: ib_uverbs] CPU: 3 UID: 0 PID: 34077 Comm: udisksd Not tainted 6.11.0-rc7 torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014 RIP: 0010:__mutex_lock+0xcf0/0x1220 Code: 08 84 d2 0f 85 c8 04 00 00 8b 15 ef b6 c8 01 85 d2 0f 85 78 f4 ff ff 48 c7 c6 20 93 ee af 48 c7 c7 60 91 ee af e8 f0 a7 6d fd <0f> 0b e9 5e f4 ff ff 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 RSP: 0018:ffff88811305f760 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff88812c652058 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001 RBP: ffff88811305f8b0 R08: 0000000000000001 R09: ffffed1075c36341 R10: ffff8883ae1b1a0b R11: 0000000000010498 R12: 0000000000000000 R13: 0000000000000000 R14: dffffc0000000000 R15: ffff88812c652058 FS: 00007f9713ae4980(0000) GS:ffff8883ae180000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcd78483c7c CR3: 0000000122c38000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? __warn.cold+0x5b/0x1af ? __mutex_lock+0xcf0/0x1220 ? report_bug+0x1ec/0x390 ? handle_bug+0x3c/0x80 ? exc_invalid_op+0x13/0x40 ? asm_exc_invalid_op+0x16/0x20 ? __mutex_lock+0xcf0/0x1220 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx___mutex_lock+0x10/0x10 ? __lock_acquire+0xd6a/0x59e0 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx_nvme_tcp_get_address+0x10/0x10 [nvme_tcp] nvme_sysfs_show_address+0x81/0xc0 [nvme_core] dev_attr_show+0x42/0x80 ? __asan_memset+0x1f/0x40 sysfs_kf_seq_show+0x1f0/0x370 seq_read_iter+0x2cb/0x1130 ? rw_verify_area+0x3b1/0x590 ? __mutex_lock+0x433/0x1220 vfs_read+0x6a6/0xa20 ? lockdep_hardirqs_on+0x78/0x100 ? __pfx_vfs_read+0x10/0x10 ksys_read+0xf7/0x1d0 ? __pfx_ksys_read+0x10/0x10 ? __x64_sys_openat+0x105/0x1d0 do_syscall_64+0x93/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? __pfx_ksys_read+0x10/0x10 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? do_syscall_64+0x9f/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f9713f55cfa Code: 55 48 89 e5 48 83 ec 20 48 89 55 e8 48 89 75 f0 89 7d f8 e8 e8 74 f8 ff 48 8b 55 e8 48 8b 75 f0 41 89 c0 8b 7d f8 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 2e 44 89 c7 48 89 45 f8 e8 42 75 f8 ff 48 8b RSP: 002b:00007ffd7f512e70 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000055c38f316859 RCX: 00007f9713f55cfa RDX: 0000000000000fff RSI: 00007ffd7f512eb0 RDI: 0000000000000011 RBP: 00007ffd7f512e90 R08: 0000000000000000 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 000055c38f317148 R13: 0000000000000000 R14: 00007f96f4004f30 R15: 000055c3b6b623c0 </TASK> The WARN is observed when the blktests test case nvme/014 is repeated with tcp transport. It is rare, and 200 times repeat is required to recreate in some test environments. To avoid the WARN, check the NVME_TCP_Q_LIVE flag before locking queue->queue_lock. The flag is cleared long time before the lock gets destroyed. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 782373b ] Commit 76d54bf ("nvme-tcp: don't access released socket during error recovery") added a mutex_lock() call for the queue->queue_lock in nvme_tcp_get_address(). However, the mutex_lock() races with mutex_destroy() in nvme_tcp_free_queue(), and causes the WARN below. DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 3 PID: 34077 at kernel/locking/mutex.c:587 __mutex_lock+0xcf0/0x1220 Modules linked in: nvmet_tcp nvmet nvme_tcp nvme_fabrics iw_cm ib_cm ib_core pktcdvd nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables qrtr sunrpc ppdev 9pnet_virtio 9pnet pcspkr netfs parport_pc parport e1000 i2c_piix4 i2c_smbus loop fuse nfnetlink zram bochs drm_vram_helper drm_ttm_helper ttm drm_kms_helper xfs drm sym53c8xx floppy nvme scsi_transport_spi nvme_core nvme_auth serio_raw ata_generic pata_acpi dm_multipath qemu_fw_cfg [last unloaded: ib_uverbs] CPU: 3 UID: 0 PID: 34077 Comm: udisksd Not tainted 6.11.0-rc7 torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014 RIP: 0010:__mutex_lock+0xcf0/0x1220 Code: 08 84 d2 0f 85 c8 04 00 00 8b 15 ef b6 c8 01 85 d2 0f 85 78 f4 ff ff 48 c7 c6 20 93 ee af 48 c7 c7 60 91 ee af e8 f0 a7 6d fd <0f> 0b e9 5e f4 ff ff 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 RSP: 0018:ffff88811305f760 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff88812c652058 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001 RBP: ffff88811305f8b0 R08: 0000000000000001 R09: ffffed1075c36341 R10: ffff8883ae1b1a0b R11: 0000000000010498 R12: 0000000000000000 R13: 0000000000000000 R14: dffffc0000000000 R15: ffff88812c652058 FS: 00007f9713ae4980(0000) GS:ffff8883ae180000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcd78483c7c CR3: 0000000122c38000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? __warn.cold+0x5b/0x1af ? __mutex_lock+0xcf0/0x1220 ? report_bug+0x1ec/0x390 ? handle_bug+0x3c/0x80 ? exc_invalid_op+0x13/0x40 ? asm_exc_invalid_op+0x16/0x20 ? __mutex_lock+0xcf0/0x1220 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx___mutex_lock+0x10/0x10 ? __lock_acquire+0xd6a/0x59e0 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx_nvme_tcp_get_address+0x10/0x10 [nvme_tcp] nvme_sysfs_show_address+0x81/0xc0 [nvme_core] dev_attr_show+0x42/0x80 ? __asan_memset+0x1f/0x40 sysfs_kf_seq_show+0x1f0/0x370 seq_read_iter+0x2cb/0x1130 ? rw_verify_area+0x3b1/0x590 ? __mutex_lock+0x433/0x1220 vfs_read+0x6a6/0xa20 ? lockdep_hardirqs_on+0x78/0x100 ? __pfx_vfs_read+0x10/0x10 ksys_read+0xf7/0x1d0 ? __pfx_ksys_read+0x10/0x10 ? __x64_sys_openat+0x105/0x1d0 do_syscall_64+0x93/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? __pfx_ksys_read+0x10/0x10 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? do_syscall_64+0x9f/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f9713f55cfa Code: 55 48 89 e5 48 83 ec 20 48 89 55 e8 48 89 75 f0 89 7d f8 e8 e8 74 f8 ff 48 8b 55 e8 48 8b 75 f0 41 89 c0 8b 7d f8 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 2e 44 89 c7 48 89 45 f8 e8 42 75 f8 ff 48 8b RSP: 002b:00007ffd7f512e70 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000055c38f316859 RCX: 00007f9713f55cfa RDX: 0000000000000fff RSI: 00007ffd7f512eb0 RDI: 0000000000000011 RBP: 00007ffd7f512e90 R08: 0000000000000000 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 000055c38f317148 R13: 0000000000000000 R14: 00007f96f4004f30 R15: 000055c3b6b623c0 </TASK> The WARN is observed when the blktests test case nvme/014 is repeated with tcp transport. It is rare, and 200 times repeat is required to recreate in some test environments. To avoid the WARN, check the NVME_TCP_Q_LIVE flag before locking queue->queue_lock. The flag is cleared long time before the lock gets destroyed. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 782373b ] Commit 76d54bf ("nvme-tcp: don't access released socket during error recovery") added a mutex_lock() call for the queue->queue_lock in nvme_tcp_get_address(). However, the mutex_lock() races with mutex_destroy() in nvme_tcp_free_queue(), and causes the WARN below. DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 3 PID: 34077 at kernel/locking/mutex.c:587 __mutex_lock+0xcf0/0x1220 Modules linked in: nvmet_tcp nvmet nvme_tcp nvme_fabrics iw_cm ib_cm ib_core pktcdvd nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables qrtr sunrpc ppdev 9pnet_virtio 9pnet pcspkr netfs parport_pc parport e1000 i2c_piix4 i2c_smbus loop fuse nfnetlink zram bochs drm_vram_helper drm_ttm_helper ttm drm_kms_helper xfs drm sym53c8xx floppy nvme scsi_transport_spi nvme_core nvme_auth serio_raw ata_generic pata_acpi dm_multipath qemu_fw_cfg [last unloaded: ib_uverbs] CPU: 3 UID: 0 PID: 34077 Comm: udisksd Not tainted 6.11.0-rc7 torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014 RIP: 0010:__mutex_lock+0xcf0/0x1220 Code: 08 84 d2 0f 85 c8 04 00 00 8b 15 ef b6 c8 01 85 d2 0f 85 78 f4 ff ff 48 c7 c6 20 93 ee af 48 c7 c7 60 91 ee af e8 f0 a7 6d fd <0f> 0b e9 5e f4 ff ff 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 RSP: 0018:ffff88811305f760 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff88812c652058 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001 RBP: ffff88811305f8b0 R08: 0000000000000001 R09: ffffed1075c36341 R10: ffff8883ae1b1a0b R11: 0000000000010498 R12: 0000000000000000 R13: 0000000000000000 R14: dffffc0000000000 R15: ffff88812c652058 FS: 00007f9713ae4980(0000) GS:ffff8883ae180000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcd78483c7c CR3: 0000000122c38000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? __warn.cold+0x5b/0x1af ? __mutex_lock+0xcf0/0x1220 ? report_bug+0x1ec/0x390 ? handle_bug+0x3c/0x80 ? exc_invalid_op+0x13/0x40 ? asm_exc_invalid_op+0x16/0x20 ? __mutex_lock+0xcf0/0x1220 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx___mutex_lock+0x10/0x10 ? __lock_acquire+0xd6a/0x59e0 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx_nvme_tcp_get_address+0x10/0x10 [nvme_tcp] nvme_sysfs_show_address+0x81/0xc0 [nvme_core] dev_attr_show+0x42/0x80 ? __asan_memset+0x1f/0x40 sysfs_kf_seq_show+0x1f0/0x370 seq_read_iter+0x2cb/0x1130 ? rw_verify_area+0x3b1/0x590 ? __mutex_lock+0x433/0x1220 vfs_read+0x6a6/0xa20 ? lockdep_hardirqs_on+0x78/0x100 ? __pfx_vfs_read+0x10/0x10 ksys_read+0xf7/0x1d0 ? __pfx_ksys_read+0x10/0x10 ? __x64_sys_openat+0x105/0x1d0 do_syscall_64+0x93/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? __pfx_ksys_read+0x10/0x10 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? do_syscall_64+0x9f/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f9713f55cfa Code: 55 48 89 e5 48 83 ec 20 48 89 55 e8 48 89 75 f0 89 7d f8 e8 e8 74 f8 ff 48 8b 55 e8 48 8b 75 f0 41 89 c0 8b 7d f8 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 2e 44 89 c7 48 89 45 f8 e8 42 75 f8 ff 48 8b RSP: 002b:00007ffd7f512e70 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000055c38f316859 RCX: 00007f9713f55cfa RDX: 0000000000000fff RSI: 00007ffd7f512eb0 RDI: 0000000000000011 RBP: 00007ffd7f512e90 R08: 0000000000000000 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 000055c38f317148 R13: 0000000000000000 R14: 00007f96f4004f30 R15: 000055c3b6b623c0 </TASK> The WARN is observed when the blktests test case nvme/014 is repeated with tcp transport. It is rare, and 200 times repeat is required to recreate in some test environments. To avoid the WARN, check the NVME_TCP_Q_LIVE flag before locking queue->queue_lock. The flag is cleared long time before the lock gets destroyed. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 782373b ] Commit 76d54bf ("nvme-tcp: don't access released socket during error recovery") added a mutex_lock() call for the queue->queue_lock in nvme_tcp_get_address(). However, the mutex_lock() races with mutex_destroy() in nvme_tcp_free_queue(), and causes the WARN below. DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 3 PID: 34077 at kernel/locking/mutex.c:587 __mutex_lock+0xcf0/0x1220 Modules linked in: nvmet_tcp nvmet nvme_tcp nvme_fabrics iw_cm ib_cm ib_core pktcdvd nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables qrtr sunrpc ppdev 9pnet_virtio 9pnet pcspkr netfs parport_pc parport e1000 i2c_piix4 i2c_smbus loop fuse nfnetlink zram bochs drm_vram_helper drm_ttm_helper ttm drm_kms_helper xfs drm sym53c8xx floppy nvme scsi_transport_spi nvme_core nvme_auth serio_raw ata_generic pata_acpi dm_multipath qemu_fw_cfg [last unloaded: ib_uverbs] CPU: 3 UID: 0 PID: 34077 Comm: udisksd Not tainted 6.11.0-rc7 torvalds#319 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014 RIP: 0010:__mutex_lock+0xcf0/0x1220 Code: 08 84 d2 0f 85 c8 04 00 00 8b 15 ef b6 c8 01 85 d2 0f 85 78 f4 ff ff 48 c7 c6 20 93 ee af 48 c7 c7 60 91 ee af e8 f0 a7 6d fd <0f> 0b e9 5e f4 ff ff 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1 RSP: 0018:ffff88811305f760 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff88812c652058 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001 RBP: ffff88811305f8b0 R08: 0000000000000001 R09: ffffed1075c36341 R10: ffff8883ae1b1a0b R11: 0000000000010498 R12: 0000000000000000 R13: 0000000000000000 R14: dffffc0000000000 R15: ffff88812c652058 FS: 00007f9713ae4980(0000) GS:ffff8883ae180000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcd78483c7c CR3: 0000000122c38000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> ? __warn.cold+0x5b/0x1af ? __mutex_lock+0xcf0/0x1220 ? report_bug+0x1ec/0x390 ? handle_bug+0x3c/0x80 ? exc_invalid_op+0x13/0x40 ? asm_exc_invalid_op+0x16/0x20 ? __mutex_lock+0xcf0/0x1220 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx___mutex_lock+0x10/0x10 ? __lock_acquire+0xd6a/0x59e0 ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp] ? __pfx_nvme_tcp_get_address+0x10/0x10 [nvme_tcp] nvme_sysfs_show_address+0x81/0xc0 [nvme_core] dev_attr_show+0x42/0x80 ? __asan_memset+0x1f/0x40 sysfs_kf_seq_show+0x1f0/0x370 seq_read_iter+0x2cb/0x1130 ? rw_verify_area+0x3b1/0x590 ? __mutex_lock+0x433/0x1220 vfs_read+0x6a6/0xa20 ? lockdep_hardirqs_on+0x78/0x100 ? __pfx_vfs_read+0x10/0x10 ksys_read+0xf7/0x1d0 ? __pfx_ksys_read+0x10/0x10 ? __x64_sys_openat+0x105/0x1d0 do_syscall_64+0x93/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? __pfx_ksys_read+0x10/0x10 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on_prepare+0x16d/0x400 ? do_syscall_64+0x9f/0x180 ? lockdep_hardirqs_on+0x78/0x100 ? do_syscall_64+0x9f/0x180 ? do_syscall_64+0x9f/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f9713f55cfa Code: 55 48 89 e5 48 83 ec 20 48 89 55 e8 48 89 75 f0 89 7d f8 e8 e8 74 f8 ff 48 8b 55 e8 48 8b 75 f0 41 89 c0 8b 7d f8 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 2e 44 89 c7 48 89 45 f8 e8 42 75 f8 ff 48 8b RSP: 002b:00007ffd7f512e70 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000055c38f316859 RCX: 00007f9713f55cfa RDX: 0000000000000fff RSI: 00007ffd7f512eb0 RDI: 0000000000000011 RBP: 00007ffd7f512e90 R08: 0000000000000000 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 000055c38f317148 R13: 0000000000000000 R14: 00007f96f4004f30 R15: 000055c3b6b623c0 </TASK> The WARN is observed when the blktests test case nvme/014 is repeated with tcp transport. It is rare, and 200 times repeat is required to recreate in some test environments. To avoid the WARN, check the NVME_TCP_Q_LIVE flag before locking queue->queue_lock. The flag is cleared long time before the lock gets destroyed. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
Including missing WAN GPIO and LED Switch.