All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/gpu/drm/bridge/ite-it6505.c:1330:5: warning: Variable 'audio_word_length_map' can be declared with const [constVariable]
@ 2022-05-02 10:04 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-05-02 10:04 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Allen Chen <allen.chen@ite.com.tw>
CC: Robert Foss <robert.foss@linaro.org>
CC: Hermes Wu <hermes.wu@ite.com.tw>
CC: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   672c0c5173427e6b3e2a9bbb7be51ceeec78093a
commit: b5c84a9edcd418cd055becad6a22439e7c5e3bf8 drm/bridge: add it6505 driver
date:   3 months ago
:::::: branch date: 13 hours ago
:::::: commit date: 3 months ago
compiler: ia64-linux-gcc (GCC) 11.3.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout b5c84a9edcd418cd055becad6a22439e7c5e3bf8
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

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


cppcheck warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/etnaviv/etnaviv_gem.c:373:9: warning: Local variable 'ret' shadows outer variable [shadowVariable]
     void *ret;
           ^
   drivers/gpu/drm/etnaviv/etnaviv_gem.c:370:6: note: Shadowed declaration
    int ret;
        ^
   drivers/gpu/drm/etnaviv/etnaviv_gem.c:373:9: note: Shadow variable
     void *ret;
           ^
>> drivers/gpu/drm/radeon/radeon_cs.c:105:31: warning: Local variable 'r' shadows outer variable [shadowVariable]
     struct drm_radeon_cs_reloc *r;
                                 ^
   drivers/gpu/drm/radeon/radeon_cs.c:87:6: note: Shadowed declaration
    int r;
        ^
   drivers/gpu/drm/radeon/radeon_cs.c:105:31: note: Shadow variable
     struct drm_radeon_cs_reloc *r;
                                 ^

cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/gpu/drm/etnaviv/etnaviv_gem.c:216:39: warning: Parameter 'context' can be declared with const [constParameter]
           struct etnaviv_iommu_context *context)
                                         ^
>> drivers/gpu/drm/etnaviv/etnaviv_gem.c:221:16: warning: Uninitialized variable: mapping->context [uninitvar]
     if (mapping->context == context)
                  ^
>> drivers/gpu/drm/etnaviv/etnaviv_gem.c:502:37: warning: Uninitialized variables: mapping.obj_node, mapping.scan_node, mapping.mmu_node, mapping.object, mapping.context, mapping.vram_node, mapping.iova [uninitvar]
      etnaviv_iommu_unmap_gem(context, mapping);
                                       ^
--
>> drivers/gpu/drm/radeon/atombios_dp.c:351:19: warning: Assigning an integer to a pointer is not portable. [AssignmentIntegerToAddress]
    args.ucLinkClock = dp_clock / 10;
                     ^
--
>> drivers/gpu/drm/radeon/radeon_cs.c:259:17: warning: Uninitialized variable: reloc->robj [uninitvar]
     resv = reloc->robj->tbo.base.resv;
                   ^
--
>> drivers/gpu/drm/radeon/radeon_connectors.c:1865:25: warning: Parameter 'hpd' can be declared with const [constParameter]
        struct radeon_hpd *hpd,
                           ^
   drivers/gpu/drm/radeon/radeon_connectors.c:2390:27: warning: Parameter 'hpd' can be declared with const [constParameter]
          struct radeon_hpd *hpd)
                             ^
>> drivers/gpu/drm/radeon/radeon_connectors.c:418:33: warning: Parameter 'encoder' can be declared with const [constParameter]
               struct drm_encoder *encoder,
                                   ^
>> drivers/gpu/drm/radeon/radeon_connectors.c:547:96: warning: Parameter 'property' can be declared with const [constParameter]
   static int radeon_connector_set_property(struct drm_connector *connector, struct drm_property *property,
                                                                                                  ^
   drivers/gpu/drm/radeon/radeon_connectors.c:940:30: warning: Parameter 'property' can be declared with const [constParameter]
           struct drm_property *property,
                                ^
>> drivers/gpu/drm/bridge/ite-it6505.c:1330:5: warning: Variable 'audio_word_length_map' can be declared with const [constVariable]
    u8 audio_word_length_map[] = { 0x02, 0x04, 0x03, 0x0B };
       ^
>> drivers/gpu/drm/bridge/ite-it6505.c:1620:56: warning: Parameter 'lane_voltage_swing' can be declared with const [constParameter]
   static bool it6505_check_max_voltage_swing_reached(u8 *lane_voltage_swing,
                                                          ^

vim +/audio_word_length_map +1330 drivers/gpu/drm/bridge/ite-it6505.c

b5c84a9edcd418 Allen Chen 2022-01-14  1326  
b5c84a9edcd418 Allen Chen 2022-01-14  1327  static void it6505_setup_audio_channel_status(struct it6505 *it6505)
b5c84a9edcd418 Allen Chen 2022-01-14  1328  {
b5c84a9edcd418 Allen Chen 2022-01-14  1329  	enum it6505_audio_sample_rate sample_rate = it6505->audio.sample_rate;
b5c84a9edcd418 Allen Chen 2022-01-14 @1330  	u8 audio_word_length_map[] = { 0x02, 0x04, 0x03, 0x0B };
b5c84a9edcd418 Allen Chen 2022-01-14  1331  
b5c84a9edcd418 Allen Chen 2022-01-14  1332  	/* Channel Status */
b5c84a9edcd418 Allen Chen 2022-01-14  1333  	it6505_write(it6505, REG_IEC958_STS0, it6505->audio.type << 1);
b5c84a9edcd418 Allen Chen 2022-01-14  1334  	it6505_write(it6505, REG_IEC958_STS1, 0x00);
b5c84a9edcd418 Allen Chen 2022-01-14  1335  	it6505_write(it6505, REG_IEC958_STS2, 0x00);
b5c84a9edcd418 Allen Chen 2022-01-14  1336  	it6505_write(it6505, REG_IEC958_STS3, sample_rate);
b5c84a9edcd418 Allen Chen 2022-01-14  1337  	it6505_write(it6505, REG_IEC958_STS4, (~sample_rate << 4) |
b5c84a9edcd418 Allen Chen 2022-01-14  1338  		     audio_word_length_map[it6505->audio.word_length]);
b5c84a9edcd418 Allen Chen 2022-01-14  1339  }
b5c84a9edcd418 Allen Chen 2022-01-14  1340  

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/gpu/drm/bridge/ite-it6505.c:1330:5: warning: Variable 'audio_word_length_map' can be declared with const [constVariable]
@ 2022-08-20  7:41 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-08-20  7:41 UTC (permalink / raw)
  To: kbuild

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

:::::: 
:::::: Manual check reason: "low confidence static check warning: drivers/gpu/drm/bridge/ite-it6505.c:1330:5: warning: Variable 'audio_word_length_map' can be declared with const [constVariable]"
:::::: 

BCC: lkp(a)intel.com
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Allen Chen <allen.chen@ite.com.tw>
CC: Robert Foss <robert.foss@linaro.org>
CC: Hermes Wu <hermes.wu@ite.com.tw>
CC: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   50cd95ac46548429e5bba7ca75cc97d11a697947
commit: b5c84a9edcd418cd055becad6a22439e7c5e3bf8 drm/bridge: add it6505 driver
date:   7 months ago
:::::: branch date: 11 hours ago
:::::: commit date: 7 months ago
compiler: powerpc-linux-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout b5c84a9edcd418cd055becad6a22439e7c5e3bf8
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

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


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/video/fbdev/carminefb.c:404:10: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    mode |= CARMINE_DEN | CARMINE_L0E;
            ^
>> drivers/video/fbdev/carminefb.c:404:10: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    mode |= CARMINE_DEN | CARMINE_L0E;
            ^
--
>> drivers/video/fbdev/gxt4500.c:257:24: warning: Either the condition 't>=0' is redundant or there is division by zero at line 257. [zerodivcond]
       n = intf * postdiv / period_ps;
                          ^
   drivers/video/fbdev/gxt4500.c:262:11: note: Assuming that condition 't>=0' is not redundant
       if (t >= 0 && t < best_error) {
             ^
   drivers/video/fbdev/gxt4500.c:261:10: note: Assignment to 't-=period_ps'
       t -= period_ps;
            ^
   drivers/video/fbdev/gxt4500.c:257:24: note: Division by zero
       n = intf * postdiv / period_ps;
                          ^
--
>> drivers/video/fbdev/cyber2000fb.c:339:24: warning: Either the condition 'regno<64' is redundant or the array 'cfb->palette[256]' is accessed at index 504, which is out of bounds. [arrayIndexOutOfBoundsCond]
      green = cfb->palette[regno << 3].green;
                          ^
   drivers/video/fbdev/cyber2000fb.c:325:39: note: Assuming that condition 'regno<64' is not redundant
     if (var->green.length == 6 && regno < 64) {
                                         ^
   drivers/video/fbdev/cyber2000fb.c:339:24: note: Array index out of bounds
      green = cfb->palette[regno << 3].green;
                          ^
>> drivers/gpu/drm/bridge/tc358764.c:247:31: warning: Signed integer overflow for expression '((1<<(31-20+1))-1)<<20'. [integerOverflow]
    tc358764_write(ctx, VP_CTRL, VP_CTRL_VSDELAY(15) | VP_CTRL_RGB888(1) |
                                 ^
--
>> drivers/video/fbdev/aty/aty128fb.c:2273:13: warning: Either the condition 'regno>0' is redundant or the array 'par->green[64]' is accessed at index 64, which is out of bounds. [arrayIndexOutOfBoundsCond]
     par->green[regno] = green;
               ^
   drivers/video/fbdev/aty/aty128fb.c:2265:37: note: Assuming that condition 'regno>0' is not redundant
    if (par->crtc.depth == 16 && regno > 0) {
                                       ^
   drivers/video/fbdev/aty/aty128fb.c:2273:13: note: Array index out of bounds
     par->green[regno] = green;
               ^
>> drivers/video/fbdev/aty/aty128fb.c:1041:5: warning: Variable 'mode_bytpp' can be declared with const [constVariable]
    u8 mode_bytpp[7] = { 0, 0, 1, 2, 2, 3, 4 };
       ^
   drivers/video/fbdev/aty/aty128fb.c:1324:16: warning: Variable 'post_conv' can be declared with const [constVariable]
    unsigned char post_conv[] = /* register values for post dividers */
                  ^
>> drivers/video/fbdev/aty/aty128fb.c:657:37: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
      if (!(aty_ld_le32(GUI_STAT) & (1 << 31))) {
                                       ^
>> drivers/video/fbdev/aty/aty128fb.c:657:37: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
      if (!(aty_ld_le32(GUI_STAT) & (1 << 31))) {
                                       ^
   drivers/video/fbdev/aty/aty128fb.c:955:11: warning: Variable 'PostDivSet' can be declared with const [constVariable]
    unsigned PostDivSet[] = { 0, 1, 2, 4, 8, 3, 6, 12 };
             ^
>> drivers/gpu/drm/panel/panel-truly-nt35597.c:237:9: warning: Uninitialized variable: ret [uninitvar]
    return ret;
           ^
   drivers/gpu/drm/panel/panel-truly-nt35597.c:230:16: note: Assuming condition is false
    for (i = 0; i < ARRAY_SIZE(ctx->dsi); i++) {
                  ^
   drivers/gpu/drm/panel/panel-truly-nt35597.c:237:9: note: Uninitialized variable: ret
    return ret;
           ^
--
>> drivers/video/fbdev/aty/atyfb_base.c:3977:11: warning: Same expression on both sides of '&&' because 'err1' and 'err2' represent the same value. [knownConditionTrueFalse]
    if (err1 && err2)
             ^
   drivers/video/fbdev/aty/atyfb_base.c:3961:13: note: 'err1' is assigned value '1' here.
    int err1 = 1, err2 = 1;
               ^
   drivers/video/fbdev/aty/atyfb_base.c:3961:23: note: 'err2' is assigned value '1' here.
    int err1 = 1, err2 = 1;
                         ^
   drivers/video/fbdev/aty/atyfb_base.c:3977:11: note: Same expression on both sides of '&&' because 'err1' and 'err2' represent the same value.
    if (err1 && err2)
             ^
>> drivers/video/fbdev/aty/atyfb_base.c:2367:5: warning: Unused variable: dac_type [unusedVariable]
    u8 dac_type;
       ^
   drivers/video/fbdev/aty/atyfb_base.c:3578:5: warning: Redundant initialization for 'rc'. The initialized value is overwritten before it is read. [redundantInitialization]
    rc = atyfb_setup_generic(pdev, info, addr);
       ^
   drivers/video/fbdev/aty/atyfb_base.c:3537:9: note: rc is initialized
    int rc = -ENOMEM;
           ^
   drivers/video/fbdev/aty/atyfb_base.c:3578:5: note: rc is overwritten
    rc = atyfb_setup_generic(pdev, info, addr);
       ^
>> drivers/gpu/drm/drm_mipi_dsi.c:307:73: warning: Parameter 'node' can be declared with const [constParameter]
   struct mipi_dsi_host *of_find_mipi_dsi_host_by_node(struct device_node *node)
                                                                           ^
--
>> drivers/gpu/drm/qxl/qxl_object.c:111:25: warning: Parameter 'surf' can be declared with const [constParameter]
       struct qxl_surface *surf,
                           ^
>> drivers/gpu/drm/ttm/ttm_bo.c:1134:28: warning: Local variable 'ctx' shadows outer argument [shadowArgument]
     struct ttm_operation_ctx ctx = { false, false };
                              ^
   drivers/gpu/drm/ttm/ttm_bo.c:1093:76: note: Shadowed declaration
   int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
                                                                              ^
   drivers/gpu/drm/ttm/ttm_bo.c:1134:28: note: Shadow variable
     struct ttm_operation_ctx ctx = { false, false };
                              ^
--
>> drivers/video/fbdev/aty/radeon_base.c:1645:5: warning: Variable 'hsync_fudge_fp' can be declared with const [constVariable]
    u8 hsync_fudge_fp[] = {2, 2, 0, 0, 5, 5};
       ^
>> drivers/video/fbdev/aty/radeon_base.c:1644:5: warning: Variable 'hsync_adj_tab' can be declared with const [constVariable]
    u8 hsync_adj_tab[] = {0, 0x12, 9, 9, 6, 5};
       ^
>> drivers/gpu/drm/bridge/tc358767.c:846:18: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
     dp0_syncval |= SYNCVAL_VS_POL_ACTIVE_LOW;
                    ^
>> drivers/gpu/drm/bridge/tc358767.c:846:18: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
     dp0_syncval |= SYNCVAL_VS_POL_ACTIVE_LOW;
                    ^
   drivers/gpu/drm/bridge/tc358767.c:1026:11: warning: Signed integer overflow for expression '15<<28'. [integerOverflow]
         (15 << 28) | /* Defer Iteration Count */
             ^
--
>> drivers/gpu/drm/bridge/ite-it6505.c:1330:5: warning: Variable 'audio_word_length_map' can be declared with const [constVariable]
    u8 audio_word_length_map[] = { 0x02, 0x04, 0x03, 0x0B };
       ^
>> drivers/gpu/drm/bridge/ite-it6505.c:1620:56: warning: Parameter 'lane_voltage_swing' can be declared with const [constParameter]
   static bool it6505_check_max_voltage_swing_reached(u8 *lane_voltage_swing,
                                                          ^
--
   In file included from drivers/gpu/drm/radeon/radeon_object.c:
>> drivers/gpu/drm/radeon/radeon_object.c:503:8: warning: Uninitialized variable: bo [uninitvar]
     if (!bo->tbo.pin_count) {
          ^
   drivers/gpu/drm/radeon/radeon_object.c:497:14: note: Assuming condition is false
    if (unlikely(r != 0)) {
                ^
   drivers/gpu/drm/radeon/radeon_object.c:502:30: note: Assignment 'bo=lobj->robj', assigned value is <Uninit>
     struct radeon_bo *bo = lobj->robj;
                                ^
   drivers/gpu/drm/radeon/radeon_object.c:503:8: note: Uninitialized variable: bo
     if (!bo->tbo.pin_count) {
          ^
>> drivers/gpu/drm/radeon/radeon_object.c:517:9: warning: Uninitialized variable: allowed [uninitvar]
      if ((allowed & current_domain) != 0 &&
           ^
   drivers/gpu/drm/radeon/radeon_object.c:497:14: note: Assuming condition is false
    if (unlikely(r != 0)) {
                ^
   drivers/gpu/drm/radeon/radeon_object.c:505:22: note: Assignment 'allowed=lobj->allowed_domains', assigned value is <Uninit>
      u32 allowed = lobj->allowed_domains;
                        ^
   drivers/gpu/drm/radeon/radeon_object.c:517:9: note: Uninitialized variable: allowed
      if ((allowed & current_domain) != 0 &&
           ^
>> drivers/gpu/drm/radeon/radeon_object.c:518:9: warning: Uninitialized variable: domain [uninitvar]
          (domain & current_domain) == 0 && /* will be moved */
           ^
   drivers/gpu/drm/radeon/radeon_object.c:497:14: note: Assuming condition is false
    if (unlikely(r != 0)) {
                ^
   drivers/gpu/drm/radeon/radeon_object.c:504:21: note: Assignment 'domain=lobj->preferred_domains', assigned value is <Uninit>
      u32 domain = lobj->preferred_domains;
                       ^
   drivers/gpu/drm/radeon/radeon_object.c:518:9: note: Uninitialized variable: domain
          (domain & current_domain) == 0 && /* will be moved */
           ^
--
>> drivers/gpu/drm/radeon/radeon_gem.c:863:43: warning: Uninitialized variable: rbo->tbo [uninitvar]
     domain = radeon_mem_type_to_domain(rbo->tbo.resource->mem_type);
                                             ^
--
>> drivers/pci/quirks.c:58:24: warning: Parameter 'end' can be declared with const [constParameter]
        struct pci_fixup *end)
                          ^
>> drivers/pci/quirks.c:3251:54: warning: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    pci_write_config_dword(dev, VTUNCERRMSK_REG, word | VTD_MSK_SPEC_ERRORS);
                                                        ^
>> drivers/pci/quirks.c:3251:54: warning: Signed integer overflow for expression '1<<31'. [integerOverflow]
    pci_write_config_dword(dev, VTUNCERRMSK_REG, word | VTD_MSK_SPEC_ERRORS);
                                                        ^

vim +/audio_word_length_map +1330 drivers/gpu/drm/bridge/ite-it6505.c

b5c84a9edcd418 Allen Chen 2022-01-14  1326  
b5c84a9edcd418 Allen Chen 2022-01-14  1327  static void it6505_setup_audio_channel_status(struct it6505 *it6505)
b5c84a9edcd418 Allen Chen 2022-01-14  1328  {
b5c84a9edcd418 Allen Chen 2022-01-14  1329  	enum it6505_audio_sample_rate sample_rate = it6505->audio.sample_rate;
b5c84a9edcd418 Allen Chen 2022-01-14 @1330  	u8 audio_word_length_map[] = { 0x02, 0x04, 0x03, 0x0B };
b5c84a9edcd418 Allen Chen 2022-01-14  1331  
b5c84a9edcd418 Allen Chen 2022-01-14  1332  	/* Channel Status */
b5c84a9edcd418 Allen Chen 2022-01-14  1333  	it6505_write(it6505, REG_IEC958_STS0, it6505->audio.type << 1);
b5c84a9edcd418 Allen Chen 2022-01-14  1334  	it6505_write(it6505, REG_IEC958_STS1, 0x00);
b5c84a9edcd418 Allen Chen 2022-01-14  1335  	it6505_write(it6505, REG_IEC958_STS2, 0x00);
b5c84a9edcd418 Allen Chen 2022-01-14  1336  	it6505_write(it6505, REG_IEC958_STS3, sample_rate);
b5c84a9edcd418 Allen Chen 2022-01-14  1337  	it6505_write(it6505, REG_IEC958_STS4, (~sample_rate << 4) |
b5c84a9edcd418 Allen Chen 2022-01-14  1338  		     audio_word_length_map[it6505->audio.word_length]);
b5c84a9edcd418 Allen Chen 2022-01-14  1339  }
b5c84a9edcd418 Allen Chen 2022-01-14  1340  

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/gpu/drm/bridge/ite-it6505.c:1330:5: warning: Variable 'audio_word_length_map' can be declared with const [constVariable]
@ 2022-04-09  5:11 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-04-09  5:11 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Allen Chen <allen.chen@ite.com.tw>
CC: Robert Foss <robert.foss@linaro.org>
CC: Hermes Wu <hermes.wu@ite.com.tw>
CC: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6c7376da23587738ab0e84b8b90b6cc02db5181e
commit: b5c84a9edcd418cd055becad6a22439e7c5e3bf8 drm/bridge: add it6505 driver
date:   10 weeks ago
:::::: branch date: 4 hours ago
:::::: commit date: 10 weeks ago
compiler: powerpc-linux-gcc (GCC) 11.2.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout b5c84a9edcd418cd055becad6a22439e7c5e3bf8
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

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


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/gpu/drm/bridge/ite-it6505.c:1330:5: warning: Variable 'audio_word_length_map' can be declared with const [constVariable]
    u8 audio_word_length_map[] = { 0x02, 0x04, 0x03, 0x0B };
       ^
>> drivers/gpu/drm/bridge/ite-it6505.c:1620:56: warning: Parameter 'lane_voltage_swing' can be declared with const [constParameter]
   static bool it6505_check_max_voltage_swing_reached(u8 *lane_voltage_swing,
                                                          ^

vim +/audio_word_length_map +1330 drivers/gpu/drm/bridge/ite-it6505.c

b5c84a9edcd418 Allen Chen 2022-01-14  1326  
b5c84a9edcd418 Allen Chen 2022-01-14  1327  static void it6505_setup_audio_channel_status(struct it6505 *it6505)
b5c84a9edcd418 Allen Chen 2022-01-14  1328  {
b5c84a9edcd418 Allen Chen 2022-01-14  1329  	enum it6505_audio_sample_rate sample_rate = it6505->audio.sample_rate;
b5c84a9edcd418 Allen Chen 2022-01-14 @1330  	u8 audio_word_length_map[] = { 0x02, 0x04, 0x03, 0x0B };
b5c84a9edcd418 Allen Chen 2022-01-14  1331  
b5c84a9edcd418 Allen Chen 2022-01-14  1332  	/* Channel Status */
b5c84a9edcd418 Allen Chen 2022-01-14  1333  	it6505_write(it6505, REG_IEC958_STS0, it6505->audio.type << 1);
b5c84a9edcd418 Allen Chen 2022-01-14  1334  	it6505_write(it6505, REG_IEC958_STS1, 0x00);
b5c84a9edcd418 Allen Chen 2022-01-14  1335  	it6505_write(it6505, REG_IEC958_STS2, 0x00);
b5c84a9edcd418 Allen Chen 2022-01-14  1336  	it6505_write(it6505, REG_IEC958_STS3, sample_rate);
b5c84a9edcd418 Allen Chen 2022-01-14  1337  	it6505_write(it6505, REG_IEC958_STS4, (~sample_rate << 4) |
b5c84a9edcd418 Allen Chen 2022-01-14  1338  		     audio_word_length_map[it6505->audio.word_length]);
b5c84a9edcd418 Allen Chen 2022-01-14  1339  }
b5c84a9edcd418 Allen Chen 2022-01-14  1340  

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-20  7:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-02 10:04 drivers/gpu/drm/bridge/ite-it6505.c:1330:5: warning: Variable 'audio_word_length_map' can be declared with const [constVariable] kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-08-20  7:41 kernel test robot
2022-04-09  5:11 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.