Re: [PATCH 3/4] serial: 8250: Add proper clock handling for OxSemi PCIe devices

kernel test robot
2021-06-16T21:01:09Z

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

Hi "Maciej,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.13-rc6 next-20210616]
[cannot apply to tty/tty-testing]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Maciej-W-Rozycki/serial-8250-Fixes-for-Oxford-Semiconductor-950-UARTs/20210616-201047
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 94f0b2d4a1d0c52035aef425da5e022bd2cb1c71
config: x86_64-randconfig-b001-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/d3a55e8397b71f343ef931cd098d42a13faf9047
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Maciej-W-Rozycki/serial-8250-Fixes-for-Oxford-Semiconductor-950-UARTs/20210616-201047
git checkout d3a55e8397b71f343ef931cd098d42a13faf9047
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

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

All warnings (new ones prefixed by >>):

>> drivers/tty/serial/8250/8250_pci.c:1258:18: warning: implicit conversion from 'int' to 'unsigned char' changes value from -129 to 127 [-Wconstant-conversion]
up->mcr_mask = ~UART_MCR_CLKSEL;
~ ^~~~~~~~~~~~~~~~
1 warning generated.

vim +1258 drivers/tty/serial/8250/8250_pci.c

1241
1242 /*
1243 * For Tornado devices we force MCR[7] set for the Divide-by-M N/8 baud rate
1244 * generator prescaler (CPR and CPR2). Otherwise no prescaler would be used.
1245 */
1246 static int pci_oxsemi_tornado_setup(struct serial_private *priv,
1247 const struct pciserial_board *board,
1248 struct uart_8250_port *up, int idx)
1249 {
1250 struct pci_dev *dev = priv->dev;
1251
1252 /* OxSemi Tornado devices are all 0xCxxx */
1253 if (dev->vendor == PCI_VENDOR_ID_OXSEMI &&
1254 (dev->device & 0xF000) == 0xC000) {
1255 up->port.get_divisor = pci_oxsemi_tornado_get_divisor;
1256 up->port.set_divisor = pci_oxsemi_tornado_set_divisor;
1257
> 1258 up->mcr_mask = ~UART_MCR_CLKSEL;
1259 up->mcr_force = UART_MCR_CLKSEL;
1260 }
1261
1262 return pci_default_setup(priv, board, up, idx);
1263 }
1264

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30253 bytes --]