All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-5.4 25/28] drivers/gpu/drm/bridge/analogix/anx7625.c:2087:5: warning: no previous prototype for function 'anx7625_audio_hw_params'
@ 2021-04-09 10:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-04-09 10:46 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head:   15178e41cf17cd7ce9f9a087bcb0677eaa57f82b
commit: 8da88d97c298af4ebd764e608a9b37ea25c95998 [25/28] CHROMIUM: drm/bridge: anx7625: add anx7625 audio hdmi-codec support
config: x86_64-randconfig-a006-20210409 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
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
        git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
        git fetch --no-tags chrome-os chromeos-5.4
        git checkout 8da88d97c298af4ebd764e608a9b37ea25c95998
        # 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/gpu/drm/bridge/analogix/anx7625.c:2087:5: warning: no previous prototype for function 'anx7625_audio_hw_params' [-Wmissing-prototypes]
   int anx7625_audio_hw_params(struct device *dev, void *data,
       ^
   drivers/gpu/drm/bridge/analogix/anx7625.c:2087:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int anx7625_audio_hw_params(struct device *dev, void *data,
   ^
   static 
   1 warning generated.


vim +/anx7625_audio_hw_params +2087 drivers/gpu/drm/bridge/analogix/anx7625.c

  2086	
> 2087	int anx7625_audio_hw_params(struct device *dev, void *data,
  2088				   struct hdmi_codec_daifmt *fmt,
  2089				   struct hdmi_codec_params *params)
  2090	{
  2091		struct anx7625_data *ctx = dev_get_drvdata(dev);
  2092		int wl, ch, rate;
  2093		int ret = 0;
  2094	
  2095		if (fmt->fmt != HDMI_DSP_A) {
  2096			DRM_DEV_ERROR(dev, "only supports DSP_A\n");
  2097			return -EINVAL;
  2098		}
  2099	
  2100		DRM_DEV_DEBUG_DRIVER(dev, "setting %d Hz, %d bit, %d channels\n",
  2101				     params->sample_rate, params->sample_width,
  2102				     params->cea.channels);
  2103	
  2104		ret |= anx7625_write_and_or(ctx, ctx->i2c.tx_p2_client,
  2105					AUDIO_CHANNEL_STATUS_6,
  2106					~I2S_SLAVE_MODE,
  2107					TDM_SLAVE_MODE);
  2108	
  2109		/* Word length */
  2110		switch (params->sample_width) {
  2111		case 16:
  2112			wl = AUDIO_W_LEN_16_20MAX;
  2113			break;
  2114		case 18:
  2115			wl = AUDIO_W_LEN_18_20MAX;
  2116			break;
  2117		case 20:
  2118			wl = AUDIO_W_LEN_20_20MAX;
  2119			break;
  2120		case 24:
  2121			wl = AUDIO_W_LEN_24_24MAX;
  2122			break;
  2123		default:
  2124			DRM_DEV_DEBUG_DRIVER(dev, "wordlength: %d bit not support",
  2125					     params->sample_width);
  2126			return -EINVAL;
  2127		}
  2128		ret |= anx7625_write_and_or(ctx, ctx->i2c.tx_p2_client,
  2129					    AUDIO_CHANNEL_STATUS_5,
  2130					    0xf0, wl);
  2131	
  2132		/* Channel num */
  2133		switch (params->cea.channels) {
  2134		case 2:
  2135			ch = I2S_CH_2;
  2136			break;
  2137		case 4:
  2138			ch = TDM_CH_4;
  2139			break;
  2140		case 6:
  2141			ch = TDM_CH_6;
  2142			break;
  2143		case 8:
  2144			ch = TDM_CH_8;
  2145			break;
  2146		default:
  2147			DRM_DEV_DEBUG_DRIVER(dev, "channel number: %d not support",
  2148					     params->cea.channels);
  2149			return -EINVAL;
  2150		}
  2151		ret |= anx7625_write_and_or(ctx, ctx->i2c.tx_p2_client,
  2152				       AUDIO_CHANNEL_STATUS_6, 0x1f, ch << 5);
  2153		if (ch > I2S_CH_2)
  2154			ret |= anx7625_write_or(ctx, ctx->i2c.tx_p2_client,
  2155					AUDIO_CHANNEL_STATUS_6, AUDIO_LAYOUT);
  2156		else
  2157			ret |= anx7625_write_and(ctx, ctx->i2c.tx_p2_client,
  2158					AUDIO_CHANNEL_STATUS_6, ~AUDIO_LAYOUT);
  2159	
  2160	
  2161	
  2162		/* FS */
  2163		switch (params->sample_rate) {
  2164		case 32000:
  2165			rate = AUDIO_FS_32K;
  2166			break;
  2167		case 44100:
  2168			rate = AUDIO_FS_441K;
  2169			break;
  2170		case 48000:
  2171			rate = AUDIO_FS_48K;
  2172			break;
  2173		case 88200:
  2174			rate = AUDIO_FS_882K;
  2175			break;
  2176		case 96000:
  2177			rate = AUDIO_FS_96K;
  2178			break;
  2179		case 176400:
  2180			rate = AUDIO_FS_1764K;
  2181			break;
  2182		case 192000:
  2183			rate = AUDIO_FS_192K;
  2184			break;
  2185		default:
  2186			DRM_DEV_DEBUG_DRIVER(dev, "sample rate: %d not support",
  2187					     params->sample_rate);
  2188			return -EINVAL;
  2189		}
  2190		ret |= anx7625_write_and_or(ctx, ctx->i2c.tx_p2_client,
  2191					    AUDIO_CHANNEL_STATUS_4,
  2192					    0xf0, rate);
  2193		ret |= anx7625_write_or(ctx, ctx->i2c.rx_p0_client,
  2194					AP_AV_STATUS, AP_AUDIO_CHG);
  2195		if (ret < 0) {
  2196			DRM_DEV_ERROR(dev, "IO error : config audio.\n");
  2197			return -EIO;
  2198		}
  2199	
  2200		return 0;
  2201	}
  2202	

---
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: 34491 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-09 10:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 10:46 [chrome-os:chromeos-5.4 25/28] drivers/gpu/drm/bridge/analogix/anx7625.c:2087:5: warning: no previous prototype for function 'anx7625_audio_hw_params' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.