Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp795455ybr; Fri, 22 May 2020 20:57:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1rNZ4OIEfDBXJrSmlsmIMj6eCixmWbVtS5ZQTCFYVvVXnNMTdh7b6/17Tu37wUlTPcXFH X-Received: by 2002:a17:906:3912:: with SMTP id f18mr11343291eje.539.1590206224983; Fri, 22 May 2020 20:57:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590206224; cv=none; d=google.com; s=arc-20160816; b=HqR/m+lEdEOAdPfNNCyq9bwee8nvPFCWfi0l9TRJl+4vpDs406OfbMd+vwCVKM+l3k pmxrTZfHGkvJ4pgdj6ILaVW9xVxNdz/QdhEiYQAUkSUsYQk3dmlSdIzvrtvzRupaj5QZ QcFIpGGlSuSaos+6DgVBVh81R0Cai9PjUV7S6njEYoYZTrRB6XkwGvq3IQVHuSmZLkpo u4Bk5bvqXM4icFxO00HgUaIZWOmepbOjb6zfQ0k3kCBP/aTUPi6GYiG5fbPJvJJJ9pCS vzdw3IKEmNeu4KXrf+AgzYafDiojobttBPx0zi6ixo0XWklYF0wMEjkAMYWjKVJe87KR 5vbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=EPafhH9pnJaTqstx2UvGSdDHFfhLmyPCCnvVrZ2DidM=; b=SzMfDXDSaxujR9MrtliMXvQnz4OQQImWdyabRVDa97xYPlUGAP8FQKyg6pgIWM0u5K F1ZmY+EAF9qiQAperepOyBaYNwl3LzroFtg+/5XRUOyhPsi5ByLtGTOaVA2uGXfI+/dL 1HSimu6YoS91x9t0B0crGTaI5e1coqQhqk7Z0azy0emdXwLP3HMR20ead0tx3ku6csPS 9rg8c+pkS5U4bavw8ag0dNYJJIFXozQsJ11IfQGm/uIpJ6tTKrBP74dgFcXG+ugALVx8 ClVyIh6wFdfWSZMPhLi8a0D+O25F2cxF99oLNTsnRxlmIdIByZxKbQdNXroPcAyN6Op8 GUsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jicZvPr0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h9si6048517ejf.485.2020.05.22.20.56.31; Fri, 22 May 2020 20:57:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jicZvPr0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387562AbgEWDu7 (ORCPT + 99 others); Fri, 22 May 2020 23:50:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387540AbgEWDu6 (ORCPT ); Fri, 22 May 2020 23:50:58 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3179C061A0E for ; Fri, 22 May 2020 20:50:58 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id e11so5132042pfn.3 for ; Fri, 22 May 2020 20:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EPafhH9pnJaTqstx2UvGSdDHFfhLmyPCCnvVrZ2DidM=; b=jicZvPr0SoeIUl4JxC5OBdgpKchxt9qYT873yS6tIpQ6a96t9AcmsRXb7WokzdGKGr sRmBdQzO7cwnkzWIv0228SkHyNoJQx7vjS59hTpYUieeXdqUn2UKvDJTOGNGM9pYU4eh kvDDtmxRZ7g3ovM6se1HlB76g/f9HMod9N3kjdlSE6QVldS8RmtG8sRM1NFx8xO9l5YA dx6aUHyjKPrS7iebbf0E4a0k+65rmHf6jK4Zj7SI23LR7Fc3ir8+5XW1nKbyg3B/Hwpi uXdXzwsnQzEQyMOHOebYkQnvzBj750en6d2wZpBR1G1aup2DjB8YL6GAPepAsBK6lktZ 68dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EPafhH9pnJaTqstx2UvGSdDHFfhLmyPCCnvVrZ2DidM=; b=iwU3x6pNdsMCHeDEBWKj0H8tREwUBjLchlgRZbfeojR0ib8HQIkFX/iRiBqogdl3Kg dv2VFDPHviwwFE/bX0qqX83Ibwkf4yUYTy8BEMpZ7MI8832lsRsTp/UFatgeMeRnZc4N XkRVtn1JfrZr7z2kMGi3wTwgNK9pLwHdQJxTHXkGo5zchG+tOF/vhcmOmkA+WiAe9wl1 fM/dbVog0WWABjdgEEpNXjGaBW7SVxapAVNFKkvQUss9l2KSXniXQm9QSMEzWCtVNd+l Pz9Gz1xVcxcKvXbOPddlnmVLfU1Z6+fFcZHwAxCDwQcIeVOk7kdYpA5p7pX/x+4eJ6v4 zf1Q== X-Gm-Message-State: AOAM532qwXKDsnBYnVHH4Sq20MXCuTKvNqsYuV83IVkBa+d4zYMfLXwA LKYv6F7NBTwxc9KF3JnU/BQ= X-Received: by 2002:a63:5a07:: with SMTP id o7mr16785320pgb.450.1590205857912; Fri, 22 May 2020 20:50:57 -0700 (PDT) Received: from localhost.localdomain ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id e1sm7805171pjv.54.2020.05.22.20.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 20:50:57 -0700 (PDT) From: Nathan Chancellor To: Kishon Vijay Abraham I , Vinod Koul Cc: linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH] phy: intel: Eliminate unnecessary assignment in intel_cbphy_set_mode Date: Fri, 22 May 2020 20:50:43 -0700 Message-Id: <20200523035043.3305846-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.27.0.rc0 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang warns: drivers/phy/intel/phy-intel-combo.c:202:34: warning: implicit conversion from enumeration type 'enum intel_phy_mode' to different enumeration type 'enum intel_combo_mode' [-Wenum-conversion] enum intel_combo_mode cb_mode = PHY_PCIE_MODE; ~~~~~~~ ^~~~~~~~~~~~~ 1 warning generated. The correct enum to use would be PCIE0_PCIE1_MODE. However, eliminating this assignment is a little better because the switch statement always assigns a new value to cb_mode, which also takes care of the warning. Fixes: ac0a95a3ea78 ("phy: intel: Add driver support for ComboPhy") Link: https://github.com/ClangBuiltLinux/linux/issues/1034 Signed-off-by: Nathan Chancellor --- drivers/phy/intel/phy-intel-combo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/intel/phy-intel-combo.c b/drivers/phy/intel/phy-intel-combo.c index c2a35be4cdfb..4bc1276ecf23 100644 --- a/drivers/phy/intel/phy-intel-combo.c +++ b/drivers/phy/intel/phy-intel-combo.c @@ -199,9 +199,9 @@ static int intel_cbphy_pcie_dis_pad_refclk(struct intel_cbphy_iphy *iphy) static int intel_cbphy_set_mode(struct intel_combo_phy *cbphy) { - enum intel_combo_mode cb_mode = PHY_PCIE_MODE; enum aggregated_mode aggr = cbphy->aggr_mode; struct device *dev = cbphy->dev; + enum intel_combo_mode cb_mode; enum intel_phy_mode mode; int ret; base-commit: c11d28ab4a691736e30b49813fb801847bd44e83 -- 2.27.0.rc0