From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D336C48BC2 for ; Wed, 23 Jun 2021 18:16:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B07D9611AC for ; Wed, 23 Jun 2021 18:15:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B07D9611AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7AF2F6B0011; Wed, 23 Jun 2021 14:15:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 75D746B005D; Wed, 23 Jun 2021 14:15:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B0B06B006C; Wed, 23 Jun 2021 14:15:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0062.hostedemail.com [216.40.44.62]) by kanga.kvack.org (Postfix) with ESMTP id 202746B0011 for ; Wed, 23 Jun 2021 14:15:57 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3E58FDB3C for ; Wed, 23 Jun 2021 18:15:57 +0000 (UTC) X-FDA: 78285792354.36.7E9FA81 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by imf15.hostedemail.com (Postfix) with ESMTP id CB27DA00024C for ; Wed, 23 Jun 2021 18:15:56 +0000 (UTC) Received: by mail-io1-f51.google.com with SMTP id k16so4582143ios.10 for ; Wed, 23 Jun 2021 11:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0skag/2cPq7r7+SiB0r8zDnCLqV2t9/0egDmPkn/Cmc=; b=mHD4zQRHChni3vyWWAfaHsY7o9/ZRIG85OAag2XsXWf8uImqU0oJeiAfryrJx/z+JP +kTKJ4tcIHuinSWpeMTkAmuZDrjEEO2eqVs3frGAQ3DqhvFHP51tGiuaqPhLusRuWg/7 VfpHqMq0xetkP+CLXTX1tlVIjKbsLzOddmFK8iHs9oT0bf3edXE/0wz3+MstQt/kgP8a JZBLwDicHRu1K1MhuyZUVpGrEFSBK6E+70fPTUngMmsSzMMUkZY73AvxxL4A5ICI7z/r DHaX3R3BgJa95td20F1I9i8Mpw0m42qBx5K3jrunFqYO9ih3bEsxCHPjF6Q3X000r/vz FG1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0skag/2cPq7r7+SiB0r8zDnCLqV2t9/0egDmPkn/Cmc=; b=T0UoACf9WHMtJg5hAR0hNqGtbIDpgyZmQdXpWIt0NUWIr4yRs30hM4YEDPiOwPoAwR tGQoKf/vGZRoSc4EwFe4Nw4dbYK9Jpl6GK1LjDVl3768N73kW/mN5vGikctHTwTVKpKA /lZ0k0GcnQDrZb3umiK0TMP1V8oCCFARMPGogE/8AauUX8+12V8qRCI81L8q4ZHBGyGY quAYg9YXIkKgNi7oU2yVVCRxtl2klLpqkw/v1apMRW9cYnB5FWz8IF4pNZHgwmukAEUK nrBcDDYsKV5wqE5JsmxF6YaQb1fKiSsRQfh6QbEHUIacyZKJ+4seguTr+skC8UpYKTUj 7jEg== X-Gm-Message-State: AOAM532CEtpu78a6FnxDaVVgPpaunvUHIPbTctpo598dkDlvvZcl8JDp U4EtEk19NAN5WuWWsKS4s5Jipx5DWkd2Lg== X-Google-Smtp-Source: ABdhPJy6WbSwdXxdPSXy2mSjhJAGOiU3eNiyWUH9kdAA3H55gzQcNoPFJ34VL7NEPCc8ZjaL6hI89Q== X-Received: by 2002:a05:6638:1919:: with SMTP id p25mr815200jal.115.1624472155370; Wed, 23 Jun 2021 11:15:55 -0700 (PDT) Received: from [172.22.22.4] (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.googlemail.com with ESMTPSA id d6sm334978ilo.64.2021.06.23.11.15.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Jun 2021 11:15:54 -0700 (PDT) Subject: Re: [linux-next:master 6165/12612] drivers/net/ipa/ipa_endpoint.c:478:6: warning: Same value in both branches of ternary operator. [duplicateValueTernary] To: kernel test robot Cc: kbuild-all@lists.01.org, Linux Memory Management List References: <202106240127.TGJDGPf7-lkp@intel.com> From: Alex Elder Message-ID: <3c166d5b-e642-a169-b0fb-deba1be68646@linaro.org> Date: Wed, 23 Jun 2021 13:15:54 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <202106240127.TGJDGPf7-lkp@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: CB27DA00024C Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=mHD4zQRH; spf=pass (imf15.hostedemail.com: domain of elder@linaro.org designates 209.85.166.51 as permitted sender) smtp.mailfrom=elder@linaro.org; dmarc=pass (policy=none) header.from=linaro.org X-Stat-Signature: d8nfiqhkcou4nxspxp9kf3kqk8gnyozx X-HE-Tag: 1624472156-354675 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 6/23/21 12:03 PM, kernel test robot wrote: > 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 > > > 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; > ^ Here is the full expression: enabled = version < IPA_VERSION_4_5 ? IPA_CS_OFFLOAD_UL : IPA_CS_OFFLOAD_INLINE; The *value* of IPA_CS_OFFLOAD_UL *happens to be* the same as IPA_CS_OFFLOAD_INLINE, but they represent distinct things. The code is doing what it's doing very intentionally. I would like to avoid being reminded of this "problem" in the future, but I don't expect replying to the robot is the way to do that. Anyone have a suggestion? Am I fine if I simply ignore this? -Alex > 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 >