Please check on line 955, which has BB_MEAS twice. julia ---------- Forwarded message ---------- Date: Tue, 13 Dec 2022 23:37:18 +0800 From: kernel test robot To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com, Julia Lawall Subject: [linux-next:master 14263/14897] drivers/iio/adc/twl6030-gpadc.c:955:16-23: duplicated argument to & or | BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev CC: Linux Memory Management List TO: Andreas Kemnade CC: Jonathan Cameron tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 39ab32797f072eaf86b1faa7384ac73450684110 commit: a3bd6876ad9476034908d6e3a9f3d6e373c55ab2 [14263/14897] iio:adc:twl6030: Enable measurements of VUSB, VBAT and others :::::: branch date: 11 hours ago :::::: commit date: 2 days ago config: sparc64-randconfig-c004-20221211 compiler: sparc64-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Reported-by: Julia Lawall cocci warnings: (new ones prefixed by >>) >> drivers/iio/adc/twl6030-gpadc.c:955:16-23: duplicated argument to & or | vim +955 drivers/iio/adc/twl6030-gpadc.c 1696f36482e706 Oleksandr Kozaruk 2013-07-25 876 1696f36482e706 Oleksandr Kozaruk 2013-07-25 877 static int twl6030_gpadc_probe(struct platform_device *pdev) 1696f36482e706 Oleksandr Kozaruk 2013-07-25 878 { 1696f36482e706 Oleksandr Kozaruk 2013-07-25 879 struct device *dev = &pdev->dev; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 880 struct twl6030_gpadc_data *gpadc; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 881 const struct twl6030_gpadc_platform_data *pdata; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 882 const struct of_device_id *match; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 883 struct iio_dev *indio_dev; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 884 int irq; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 885 int ret; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 886 fc21acc471d30e Sachin Kamat 2013-10-21 887 match = of_match_device(of_twl6030_match_tbl, dev); 1696f36482e706 Oleksandr Kozaruk 2013-07-25 888 if (!match) 1696f36482e706 Oleksandr Kozaruk 2013-07-25 889 return -EINVAL; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 890 1696f36482e706 Oleksandr Kozaruk 2013-07-25 891 pdata = match->data; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 892 fa659a40b80b06 Oleksandr Kozaruk 2013-08-19 893 indio_dev = devm_iio_device_alloc(dev, sizeof(*gpadc)); fa659a40b80b06 Oleksandr Kozaruk 2013-08-19 894 if (!indio_dev) fa659a40b80b06 Oleksandr Kozaruk 2013-08-19 895 return -ENOMEM; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 896 1696f36482e706 Oleksandr Kozaruk 2013-07-25 897 gpadc = iio_priv(indio_dev); 1696f36482e706 Oleksandr Kozaruk 2013-07-25 898 a86854d0c599b3 Kees Cook 2018-06-12 899 gpadc->twl6030_cal_tbl = devm_kcalloc(dev, a86854d0c599b3 Kees Cook 2018-06-12 900 pdata->nchannels, a86854d0c599b3 Kees Cook 2018-06-12 901 sizeof(*gpadc->twl6030_cal_tbl), a86854d0c599b3 Kees Cook 2018-06-12 902 GFP_KERNEL); 1696f36482e706 Oleksandr Kozaruk 2013-07-25 903 if (!gpadc->twl6030_cal_tbl) fa659a40b80b06 Oleksandr Kozaruk 2013-08-19 904 return -ENOMEM; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 905 1696f36482e706 Oleksandr Kozaruk 2013-07-25 906 gpadc->dev = dev; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 907 gpadc->pdata = pdata; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 908 1696f36482e706 Oleksandr Kozaruk 2013-07-25 909 platform_set_drvdata(pdev, indio_dev); 1696f36482e706 Oleksandr Kozaruk 2013-07-25 910 mutex_init(&gpadc->lock); 1696f36482e706 Oleksandr Kozaruk 2013-07-25 911 init_completion(&gpadc->irq_complete); 1696f36482e706 Oleksandr Kozaruk 2013-07-25 912 1696f36482e706 Oleksandr Kozaruk 2013-07-25 913 ret = pdata->calibrate(gpadc); 1696f36482e706 Oleksandr Kozaruk 2013-07-25 914 if (ret < 0) { b0fc3f1dbe2a57 Tang Bin 2021-08-23 915 dev_err(dev, "failed to read calibration registers\n"); fa659a40b80b06 Oleksandr Kozaruk 2013-08-19 916 return ret; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 917 } 1696f36482e706 Oleksandr Kozaruk 2013-07-25 918 1696f36482e706 Oleksandr Kozaruk 2013-07-25 919 irq = platform_get_irq(pdev, 0); 7c279229f980e5 Stephen Boyd 2019-07-30 920 if (irq < 0) fa659a40b80b06 Oleksandr Kozaruk 2013-08-19 921 return irq; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 922 fa659a40b80b06 Oleksandr Kozaruk 2013-08-19 923 ret = devm_request_threaded_irq(dev, irq, NULL, fa659a40b80b06 Oleksandr Kozaruk 2013-08-19 924 twl6030_gpadc_irq_handler, 1696f36482e706 Oleksandr Kozaruk 2013-07-25 925 IRQF_ONESHOT, "twl6030_gpadc", indio_dev); b30537a4cedcac Jiasheng Jiang 2022-02-24 926 if (ret) b30537a4cedcac Jiasheng Jiang 2022-02-24 927 return ret; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 928 1696f36482e706 Oleksandr Kozaruk 2013-07-25 929 ret = twl6030_gpadc_enable_irq(TWL6030_GPADC_RT_SW1_EOC_MASK); 1696f36482e706 Oleksandr Kozaruk 2013-07-25 930 if (ret < 0) { b0fc3f1dbe2a57 Tang Bin 2021-08-23 931 dev_err(dev, "failed to enable GPADC interrupt\n"); fa659a40b80b06 Oleksandr Kozaruk 2013-08-19 932 return ret; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 933 } 1696f36482e706 Oleksandr Kozaruk 2013-07-25 934 1696f36482e706 Oleksandr Kozaruk 2013-07-25 935 ret = twl_i2c_write_u8(TWL6030_MODULE_ID1, TWL6030_GPADCS, 1696f36482e706 Oleksandr Kozaruk 2013-07-25 936 TWL6030_REG_TOGGLE1); 1696f36482e706 Oleksandr Kozaruk 2013-07-25 937 if (ret < 0) { b0fc3f1dbe2a57 Tang Bin 2021-08-23 938 dev_err(dev, "failed to enable GPADC module\n"); fa659a40b80b06 Oleksandr Kozaruk 2013-08-19 939 return ret; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 940 } 1696f36482e706 Oleksandr Kozaruk 2013-07-25 941 a3bd6876ad9476 Andreas Kemnade 2022-12-01 942 ret = twl_i2c_write_u8(TWL_MODULE_USB, VBUS_MEAS, USB_VBUS_CTRL_SET); a3bd6876ad9476 Andreas Kemnade 2022-12-01 943 if (ret < 0) { a3bd6876ad9476 Andreas Kemnade 2022-12-01 944 dev_err(dev, "failed to wire up inputs\n"); a3bd6876ad9476 Andreas Kemnade 2022-12-01 945 return ret; a3bd6876ad9476 Andreas Kemnade 2022-12-01 946 } a3bd6876ad9476 Andreas Kemnade 2022-12-01 947 a3bd6876ad9476 Andreas Kemnade 2022-12-01 948 ret = twl_i2c_write_u8(TWL_MODULE_USB, ID_MEAS, USB_ID_CTRL_SET); a3bd6876ad9476 Andreas Kemnade 2022-12-01 949 if (ret < 0) { a3bd6876ad9476 Andreas Kemnade 2022-12-01 950 dev_err(dev, "failed to wire up inputs\n"); a3bd6876ad9476 Andreas Kemnade 2022-12-01 951 return ret; a3bd6876ad9476 Andreas Kemnade 2022-12-01 952 } a3bd6876ad9476 Andreas Kemnade 2022-12-01 953 a3bd6876ad9476 Andreas Kemnade 2022-12-01 954 ret = twl_i2c_write_u8(TWL6030_MODULE_ID0, a3bd6876ad9476 Andreas Kemnade 2022-12-01 @955 VBAT_MEAS | BB_MEAS | BB_MEAS, a3bd6876ad9476 Andreas Kemnade 2022-12-01 956 TWL6030_MISC1); a3bd6876ad9476 Andreas Kemnade 2022-12-01 957 if (ret < 0) { a3bd6876ad9476 Andreas Kemnade 2022-12-01 958 dev_err(dev, "failed to wire up inputs\n"); a3bd6876ad9476 Andreas Kemnade 2022-12-01 959 return ret; a3bd6876ad9476 Andreas Kemnade 2022-12-01 960 } a3bd6876ad9476 Andreas Kemnade 2022-12-01 961 1696f36482e706 Oleksandr Kozaruk 2013-07-25 962 indio_dev->name = DRIVER_NAME; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 963 indio_dev->info = &twl6030_gpadc_iio_info; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 964 indio_dev->modes = INDIO_DIRECT_MODE; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 965 indio_dev->channels = pdata->iio_channels; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 966 indio_dev->num_channels = pdata->nchannels; 1696f36482e706 Oleksandr Kozaruk 2013-07-25 967 ae0f29d1593fab Sachin Kamat 2013-10-24 968 return iio_device_register(indio_dev); 1696f36482e706 Oleksandr Kozaruk 2013-07-25 969 } 1696f36482e706 Oleksandr Kozaruk 2013-07-25 970 -- 0-DAY CI Kernel Test Service https://01.org/lkp