lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202212170530.3gQzueyl-lkp@intel.com>
Date:   Sat, 17 Dec 2022 06:16:06 +0800
From:   kernel test robot <lkp@...el.com>
To:     Eugen Hristev <eugen.hristev@...rochip.com>,
        linux-media@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-phy@...ts.infradead.org,
        luis.oliveira@...opsys.com,
        Eugen Hristev <eugen.hristev@...rochip.com>
Subject: Re: [PATCH v5 4/4] media: platform: dwc: Add DW MIPI DPHY Rx driver

Hi Eugen,

I love your patch! Perhaps something to improve:

[auto build test WARNING on media-tree/master]
[also build test WARNING on robh/for-next linus/master sailus-media-tree/streams v6.1 next-20221216]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Eugen-Hristev/media-dwc-add-csi2host-driver/20221216-224024
base:   git://linuxtv.org/media_tree.git master
patch link:    https://lore.kernel.org/r/20221216143717.1002015-5-eugen.hristev%40microchip.com
patch subject: [PATCH v5 4/4] media: platform: dwc: Add DW MIPI DPHY Rx driver
config: sh-allmodconfig
compiler: sh4-linux-gcc (GCC) 12.1.0
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
        # https://github.com/intel-lab-lkp/linux/commit/35c9955340fd6d88770ab7d142b7a1d2b5b0d156
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Eugen-Hristev/media-dwc-add-csi2host-driver/20221216-224024
        git checkout 35c9955340fd6d88770ab7d142b7a1d2b5b0d156
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/media/

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

All warnings (new ones prefixed by >>):

   drivers/media/platform/dwc/dw-csi-plat.c: In function 'dw_csi_probe':
>> drivers/media/platform/dwc/dw-csi-plat.c:541:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
     541 |         else
         |         ^~~~
   drivers/media/platform/dwc/dw-csi-plat.c:544:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
     544 |                 goto end;
         |                 ^~~~
   In file included from drivers/media/platform/dwc/dw-csi-plat.c:11:
   include/media/dwc/dw-csi-data.h: At top level:
   include/media/dwc/dw-csi-data.h:23:33: warning: 'csis' defined but not used [-Wunused-const-variable=]
      23 | static const struct pdata_names csis[] = {
         |                                 ^~~~
--
>> drivers/media/platform/dwc/dw-dphy-rx.c:97:6: warning: no previous prototype for 'dw_dphy_if_write' [-Wmissing-prototypes]
      97 | void dw_dphy_if_write(struct dw_dphy_rx *dphy, u32 address, u32 data)
         |      ^~~~~~~~~~~~~~~~
   drivers/media/platform/dwc/dw-dphy-rx.c: In function 'dw_dphy_read':
>> drivers/media/platform/dwc/dw-dphy-rx.c:144:24: warning: variable 'dphy2' set but not used [-Wunused-but-set-variable]
     144 |         int dphy1 = 0, dphy2 = 0;
         |                        ^~~~~
   drivers/media/platform/dwc/dw-dphy-rx.c: At top level:
>> drivers/media/platform/dwc/dw-dphy-rx.c:161:6: warning: no previous prototype for 'dw_dphy_write_msk' [-Wmissing-prototypes]
     161 | void dw_dphy_write_msk(struct dw_dphy_rx *dev, u32 address, u32 data, u8 shift,
         |      ^~~~~~~~~~~~~~~~~
>> drivers/media/platform/dwc/dw-dphy-rx.c:353:5: warning: no previous prototype for 'dw_dphy_g118_settle' [-Wmissing-prototypes]
     353 | int dw_dphy_g118_settle(struct dw_dphy_rx *dphy)
         |     ^~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/dwc/dw-dphy-rx.c:500:5: warning: no previous prototype for 'dw_dphy_if_set_idelay' [-Wmissing-prototypes]
     500 | int dw_dphy_if_set_idelay(struct dw_dphy_rx *dphy, u8 dly, u8 cells)
         |     ^~~~~~~~~~~~~~~~~~~~~
--
   drivers/media/platform/dwc/dw-dphy-sysfs.c: In function 'dphy_addr_store':
>> drivers/media/platform/dwc/dw-dphy-sysfs.c:79:18: warning: variable 'payload' set but not used [-Wunused-but-set-variable]
      79 |         u8 addr, payload;
         |                  ^~~~~~~


vim +/dw_dphy_if_write +97 drivers/media/platform/dwc/dw-dphy-rx.c

    95	
    96	#if IS_ENABLED(CONFIG_DWC_MIPI_TC_DPHY_GEN3)
  > 97	void dw_dphy_if_write(struct dw_dphy_rx *dphy, u32 address, u32 data)
    98	{
    99		writel(data, dphy->dphy1_if_addr + address);
   100	
   101		if (dphy->lanes_config == CTRL_4_LANES)
   102			return;
   103	
   104		iowrite32(data, dphy->dphy2_if_addr + address);
   105	}
   106	
   107	u32 dw_dphy_if_read(struct dw_dphy_rx *dphy, u32 address)
   108	{
   109		u32 if1 = 0, if2 = 0;
   110	
   111		if1 = readl(dphy->dphy1_if_addr + address);
   112	
   113		if (dphy->lanes_config == CTRL_4_LANES)
   114			goto end;
   115	
   116		if (dphy->lanes_config == DPHYID)
   117			goto end;
   118	
   119		if2 = readl(dphy->dphy2_if_addr + address);
   120	
   121		if (if1 != if2)
   122			dev_vdbg(&dphy->phy->dev,
   123				 "Values read different for each interface\n");
   124	end:
   125		return if1;
   126	}
   127	#endif
   128	
   129	void dw_dphy_write(struct dw_dphy_rx *dphy, u32 address, u32 data)
   130	{
   131		iowrite32(data, dphy->base_address + address);
   132	
   133		if (dphy->lanes_config == CTRL_4_LANES)
   134			return;
   135	
   136		if (address == R_CSI2_DPHY_TST_CTRL0)
   137			iowrite32(data, dphy->base_address + R_CSI2_DPHY2_TST_CTRL0);
   138		else if (address == R_CSI2_DPHY_TST_CTRL1)
   139			iowrite32(data, dphy->base_address + R_CSI2_DPHY2_TST_CTRL1);
   140	}
   141	
   142	u32 dw_dphy_read(struct dw_dphy_rx *dphy, u32 address)
   143	{
 > 144		int dphy1 = 0, dphy2 = 0;
   145	
   146		dphy1 = ioread32(dphy->base_address + address);
   147	
   148		if (dphy->lanes_config == CTRL_4_LANES)
   149			goto end;
   150	
   151		if (address == R_CSI2_DPHY_TST_CTRL0)
   152			dphy2 = ioread32(dphy->base_address + R_CSI2_DPHY2_TST_CTRL0);
   153		else if (address == R_CSI2_DPHY_TST_CTRL1)
   154			dphy2 = ioread32(dphy->base_address + R_CSI2_DPHY2_TST_CTRL1);
   155		else
   156			return -ENODEV;
   157	end:
   158		return dphy1;
   159	}
   160	
 > 161	void dw_dphy_write_msk(struct dw_dphy_rx *dev, u32 address, u32 data, u8 shift,
   162			       u8 width)
   163	{
   164		u32 temp = dw_dphy_read(dev, address);
   165		u32 mask = (1 << width) - 1;
   166	
   167		temp &= ~(mask << shift);
   168		temp |= (data & mask) << shift;
   169		dw_dphy_write(dev, address, temp);
   170	}
   171	

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

View attachment "config" of type "text/plain" (244448 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ