Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp2390261rdb; Mon, 25 Dec 2023 08:37:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtLg20eHjOwDfV+qmiRSI4FZfRhaB8GfGp1T+Ou+uLweBLb9h9rsFXExExUUq4Wrdy8Z0e X-Received: by 2002:a17:902:db07:b0:1d4:299e:6c48 with SMTP id m7-20020a170902db0700b001d4299e6c48mr6237486plx.24.1703522258773; Mon, 25 Dec 2023 08:37:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703522258; cv=none; d=google.com; s=arc-20160816; b=u2BccnTtkpVntyXPh4l9d2M4PB8yPr7qzf7nA9XdM7YSQbj36JV/AMIGLvimlzS/1C 0aFLmxAkBxH20D/cRS5P+FxGbpsVJvEs9QL69Se5aqfTEmwl+dvwuR5JAgO+Q2wW0BEs blkT/LP3KUH83pGdiDwNSL28irw5X5Rckv7qP9/bTiiczrws8ffmTotSNHcCQXKHJkwb dCELZko0BqwRh/tOHa+R6PeX08IyGqJ5gs2xq23tGDQEM6RoZ6kpuD3Lb9Gh4qsCMVs1 HVpJRH4WEC/4IdJUklKO4nn/Txudg0l+njlZBBB7FONLz+eWyw0m/t3mjrXw2lm0uq5z VCiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:subject:cc:to:from:date:dkim-signature; bh=DO3IVj/i1qvBZ1bJmTFOQff7XWWb25de+GHNZH7f/tI=; fh=z7BGqlUAVwWgISyv+zej/1y+K5Gre+ef2SIEgjCye3w=; b=VcpIYzVeghG5kHjRkPyP5DjwAVhnCjm9qP5WpqTIL/AdYKGJJOG0+gj6EB4N2gJeHZ 8/HvH8Zum3CnTKGplhFaLToKQbMEz9nrmN/dn06QPd94pJXZeYLZJD7tMkNkQJwh1fZn PTwgzcwKPdIVBFdI6eyd7Sm6Hoe4pjB89gumzz5vCwpt8adT+uRj6OX41yzADiQEkMZv GFFtRCmZsEB6XhVSnAPuzvFc6Li+ZhCehO5iWbUutk6iKajdobWfNq4gpCP8z0yhyKRK 1LNCw3lWY7YjNYlgBJFAlFBlerG3LEgb+wyBmV7q73BOMqJ/jIMpK5Uow//xajLRHrbD Ay+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=u4gy7Mgm; spf=pass (google.com: domain of linux-kernel+bounces-11121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id lx16-20020a17090b4b1000b0028be7994ce1si8388968pjb.161.2023.12.25.08.37.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Dec 2023 08:37:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=u4gy7Mgm; spf=pass (google.com: domain of linux-kernel+bounces-11121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7A5CDB217BD for ; Mon, 25 Dec 2023 16:37:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C59826AD3; Mon, 25 Dec 2023 16:37:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.b="u4gy7Mgm" X-Original-To: linux-kernel@vger.kernel.org Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DF3651C26 for ; Mon, 25 Dec 2023 16:37:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:message-id:mime-version; bh=DO3IVj/i1qvBZ1bJmTFOQff7XWWb25de+GHNZH7f/tI=; b=u4gy7MgmBl3mZLYRguhzGJU+F9ReZt6IAemO1qcGe+6/7n2BYzszHV8c uhXPcjI+AuwGCwveSq1lA8VZ9zVZgfwwrgujNiGJHon9TJ75ZJR//3R3Q DjXrztRqFSslp6KFaWYUHAwB+3LTh/pHFMJTapEG0F/Eo+gzCs2TSE8il A=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.04,303,1695679200"; d="scan'208";a="143987498" Received: from 231.85.89.92.rev.sfr.net (HELO hadrien) ([92.89.85.231]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Dec 2023 17:37:14 +0100 Date: Mon, 25 Dec 2023 17:37:13 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Wenjing Liu , Alex Deucher , George Shen , Jun Lei cc: linux-kernel@vger.kernel.org, oe-kbuild-all@lists.linux.dev Subject: drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c:220:21-22: WARNING opportunity for max() (fwd) Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII ---------- Forwarded message ---------- Date: Tue, 26 Dec 2023 00:30:41 +0800 From: kernel test robot To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com, Julia Lawall Subject: drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c:220:21-22: WARNING opportunity for max() BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev CC: linux-kernel@vger.kernel.org TO: Wenjing Liu CC: Alex Deucher CC: George Shen CC: Jun Lei tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 861deac3b092f37b2c5e6871732f3e11486f7082 commit: bc33f5e5f05ba44e48909e2cfc5a97475ec69a4d drm/amd/display: create accessories, hwss and protocols sub folders in link date: 11 months ago :::::: branch date: 2 days ago :::::: commit date: 11 months ago config: loongarch-randconfig-r062-20231222 (https://download.01.org/0day-ci/archive/20231226/202312260025.3KcJ7K0e-lkp@intel.com/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Julia Lawall | Closes: https://lore.kernel.org/r/202312260025.3KcJ7K0e-lkp@intel.com/ cocci warnings: (new ones prefixed by >>) >> drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c:220:21-22: WARNING opportunity for max() drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c:227:21-22: WARNING opportunity for max() vim +220 drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 204 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 205 static uint32_t defer_delay_converter_wa( 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 206 struct ddc_service *ddc, 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 207 uint32_t defer_delay) 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 208 { d0778ebfd58f56 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-07-22 209 struct dc_link *link = ddc->link; 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 210 fd952d436446cf drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Taimur Hassan 2021-01-15 211 if (link->dpcd_caps.dongle_type == DISPLAY_DONGLE_DP_VGA_CONVERTER && fd952d436446cf drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Taimur Hassan 2021-01-15 212 link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_0080E1 && 10a9accd4842e6 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Ilya 2022-02-10 213 (link->dpcd_caps.branch_fw_revision[0] < 0x01 || 10a9accd4842e6 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Ilya 2022-02-10 214 (link->dpcd_caps.branch_fw_revision[0] == 0x01 && 10a9accd4842e6 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Ilya 2022-02-10 215 link->dpcd_caps.branch_fw_revision[1] < 0x40)) && fd952d436446cf drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Taimur Hassan 2021-01-15 216 !memcmp(link->dpcd_caps.branch_dev_name, fd952d436446cf drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Taimur Hassan 2021-01-15 217 DP_VGA_DONGLE_BRANCH_DEV_NAME, fd952d436446cf drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Taimur Hassan 2021-01-15 218 sizeof(link->dpcd_caps.branch_dev_name))) fd952d436446cf drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Taimur Hassan 2021-01-15 219 fd952d436446cf drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Taimur Hassan 2021-01-15 @220 return defer_delay > DPVGA_DONGLE_AUX_DEFER_WA_DELAY ? fd952d436446cf drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Taimur Hassan 2021-01-15 221 defer_delay : DPVGA_DONGLE_AUX_DEFER_WA_DELAY; fd952d436446cf drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Taimur Hassan 2021-01-15 222 df3b7e32ed459a drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Qingqing Zhuo 2019-07-31 223 if (link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_0080E1 && 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 224 !memcmp(link->dpcd_caps.branch_dev_name, 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 225 DP_DVI_CONVERTER_ID_4, 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 226 sizeof(link->dpcd_caps.branch_dev_name))) 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 227 return defer_delay > I2C_OVER_AUX_DEFER_WA_DELAY ? 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 228 defer_delay : I2C_OVER_AUX_DEFER_WA_DELAY; 7154a51b534707 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c jinlong zhang 2020-09-25 229 if (link->dpcd_caps.branch_dev_id == DP_BRANCH_DEVICE_ID_006037 && 7154a51b534707 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c jinlong zhang 2020-09-25 230 !memcmp(link->dpcd_caps.branch_dev_name, 7154a51b534707 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c jinlong zhang 2020-09-25 231 DP_DVI_CONVERTER_ID_5, 7154a51b534707 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c jinlong zhang 2020-09-25 232 sizeof(link->dpcd_caps.branch_dev_name))) 7154a51b534707 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c jinlong zhang 2020-09-25 233 return defer_delay > I2C_OVER_AUX_DEFER_WA_DELAY_1MS ? 7154a51b534707 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c jinlong zhang 2020-09-25 234 I2C_OVER_AUX_DEFER_WA_DELAY_1MS : defer_delay; 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 235 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 236 return defer_delay; 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 237 } 4562236b3bc0a2 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c Harry Wentland 2017-09-12 238 :::::: The code at line 220 was first introduced by commit :::::: fd952d436446cffdf97a61bf456a0987011e42e0 drm/amd/display: Workaround for some legacy DP-VGA dongles :::::: TO: Taimur Hassan :::::: CC: Alex Deucher -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki