From: kernel test robot <lkp@intel.com> To: Alex Elder <elder@linaro.org> Cc: kbuild-all@lists.01.org, Linux Memory Management List <linux-mm@kvack.org> Subject: [linux-next:master 6165/12612] drivers/net/ipa/ipa_endpoint.c:478:6: warning: Same value in both branches of ternary operator. [duplicateValueTernary] Date: Thu, 24 Jun 2021 01:03:51 +0800 [thread overview] Message-ID: <202106240127.TGJDGPf7-lkp@intel.com> (raw) tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: d61c8b66c84080ecf8f9f4d9272ab4ec78029a59 commit: 5567d4d9e7381230462a564d4f466177f3ba9dd5 [6165/12612] net: ipa: add support for inline checksum offload compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0 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/net/ipa/ipa_endpoint.c:478:6: warning: Same value in both branches of ternary operator. [duplicateValueTernary] : IPA_CS_OFFLOAD_INLINE; ^ cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> net/sctp/socket.c:6135:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] to += addrlen; ^ >> net/sctp/socket.c:6137:3: warning: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg] space_left -= addrlen; ^ vim +478 drivers/net/ipa/ipa_endpoint.c 456 457 static void ipa_endpoint_init_cfg(struct ipa_endpoint *endpoint) 458 { 459 u32 offset = IPA_REG_ENDP_INIT_CFG_N_OFFSET(endpoint->endpoint_id); 460 enum ipa_cs_offload_en enabled; 461 u32 val = 0; 462 463 /* FRAG_OFFLOAD_EN is 0 */ 464 if (endpoint->data->checksum) { 465 enum ipa_version version = endpoint->ipa->version; 466 467 if (endpoint->toward_ipa) { 468 u32 checksum_offset; 469 470 /* Checksum header offset is in 4-byte units */ 471 checksum_offset = sizeof(struct rmnet_map_header); 472 checksum_offset /= sizeof(u32); 473 val |= u32_encode_bits(checksum_offset, 474 CS_METADATA_HDR_OFFSET_FMASK); 475 476 enabled = version < IPA_VERSION_4_5 477 ? IPA_CS_OFFLOAD_UL > 478 : IPA_CS_OFFLOAD_INLINE; 479 } else { 480 enabled = version < IPA_VERSION_4_5 481 ? IPA_CS_OFFLOAD_DL 482 : IPA_CS_OFFLOAD_INLINE; 483 } 484 } else { 485 enabled = IPA_CS_OFFLOAD_NONE; 486 } 487 val |= u32_encode_bits(enabled, CS_OFFLOAD_EN_FMASK); 488 /* CS_GEN_QMB_MASTER_SEL is 0 */ 489 490 iowrite32(val, endpoint->ipa->reg_virt + offset); 491 } 492 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com> To: kbuild-all@lists.01.org Subject: [linux-next:master 6165/12612] drivers/net/ipa/ipa_endpoint.c:478:6: warning: Same value in both branches of ternary operator. [duplicateValueTernary] Date: Thu, 24 Jun 2021 01:03:51 +0800 [thread overview] Message-ID: <202106240127.TGJDGPf7-lkp@intel.com> (raw) [-- Attachment #1: Type: text/plain, Size: 2504 bytes --] tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: d61c8b66c84080ecf8f9f4d9272ab4ec78029a59 commit: 5567d4d9e7381230462a564d4f466177f3ba9dd5 [6165/12612] net: ipa: add support for inline checksum offload compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0 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/net/ipa/ipa_endpoint.c:478:6: warning: Same value in both branches of ternary operator. [duplicateValueTernary] : IPA_CS_OFFLOAD_INLINE; ^ cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> net/sctp/socket.c:6135:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] to += addrlen; ^ >> net/sctp/socket.c:6137:3: warning: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg] space_left -= addrlen; ^ vim +478 drivers/net/ipa/ipa_endpoint.c 456 457 static void ipa_endpoint_init_cfg(struct ipa_endpoint *endpoint) 458 { 459 u32 offset = IPA_REG_ENDP_INIT_CFG_N_OFFSET(endpoint->endpoint_id); 460 enum ipa_cs_offload_en enabled; 461 u32 val = 0; 462 463 /* FRAG_OFFLOAD_EN is 0 */ 464 if (endpoint->data->checksum) { 465 enum ipa_version version = endpoint->ipa->version; 466 467 if (endpoint->toward_ipa) { 468 u32 checksum_offset; 469 470 /* Checksum header offset is in 4-byte units */ 471 checksum_offset = sizeof(struct rmnet_map_header); 472 checksum_offset /= sizeof(u32); 473 val |= u32_encode_bits(checksum_offset, 474 CS_METADATA_HDR_OFFSET_FMASK); 475 476 enabled = version < IPA_VERSION_4_5 477 ? IPA_CS_OFFLOAD_UL > 478 : IPA_CS_OFFLOAD_INLINE; 479 } else { 480 enabled = version < IPA_VERSION_4_5 481 ? IPA_CS_OFFLOAD_DL 482 : IPA_CS_OFFLOAD_INLINE; 483 } 484 } else { 485 enabled = IPA_CS_OFFLOAD_NONE; 486 } 487 val |= u32_encode_bits(enabled, CS_OFFLOAD_EN_FMASK); 488 /* CS_GEN_QMB_MASTER_SEL is 0 */ 489 490 iowrite32(val, endpoint->ipa->reg_virt + offset); 491 } 492 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next reply other threads:[~2021-06-23 17:04 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-23 17:03 kernel test robot [this message] 2021-06-23 17:03 ` [linux-next:master 6165/12612] drivers/net/ipa/ipa_endpoint.c:478:6: warning: Same value in both branches of ternary operator. [duplicateValueTernary] kernel test robot 2021-06-23 18:15 ` Alex Elder 2021-06-23 18:15 ` Alex Elder
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=202106240127.TGJDGPf7-lkp@intel.com \ --to=lkp@intel.com \ --cc=elder@linaro.org \ --cc=kbuild-all@lists.01.org \ --cc=linux-mm@kvack.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.