From patchwork Mon Feb 6 13:58:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 53280 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2251805wrn; Mon, 6 Feb 2023 06:04:30 -0800 (PST) X-Google-Smtp-Source: AK7set+4MtWFkAwaEFRkgXXLSJU0vcAreo34iBhuiDyvZVQ7ZFG1Jf44Yvflcbj01JhBPrwZFJVh X-Received: by 2002:a62:e81a:0:b0:580:fb8e:3044 with SMTP id c26-20020a62e81a000000b00580fb8e3044mr19491124pfi.22.1675692269461; Mon, 06 Feb 2023 06:04:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675692269; cv=none; d=google.com; s=arc-20160816; b=Dmsnpj3lLj0r4afleyjhWC7KSJwDk7nBuuJrHHwk3fbzCMWDQnWdoAwUwC9Kt4xaGc CvlvBMfHAV/61/6AJaQoH8oTuZlmd62c0wfUSR7aah4FB1s39LPi4nfAmBxEPG7zHm4t 0BN7gCKva2GgtpcJ+q9trE0HgtuKqg/8W2daAC/sZY6TWSGhpKktt22FemQU9oVX2xEk rMqfIg1IzcHI3l+UOrPgEAkIYWn65DuBdABPAcLDCuPSIgH8CUrrtDjmlgGyDjkPJZCe NTG+8vmjvr+FcDNy5pjBgawWHOkNikkhE4LHuh0On3nHFhNNx0nXv+Qsk9+h2VdovsDr a+Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=clH41W/lVoNcFLsG24Ai/QiAFITnKECHLPzrN7ce1sU=; b=cazRp46hFyQUz1WxDOyd0WnRRQW+b1KKxhTDM/XB7c1nHtSs3pn0BuJLtqw19yF7Zv pHDuuuulrJs2SggdsgSLRw57TSwEhUniT2wtXkPBCOFKDwcxR4giqlhMyy25F4jmg7Iq G6kMuXzpuxi2XDe+74WkZOfVf7S0tc0gJWRlsWl6umMHwy0WI6TIR8rN1/B0Yg1+B0VJ P3iC/VC6juXjAJ1PLItgHwVv2XsK+0y7REjD68NYZQnuby/JgkuLtidw0ycgD2T4X7Qx IznPcqv6Uw2FxZ4S/lNxHYjF1tY7Mk4az+UuWJHlXdn8aBjPX25C74/ccbl1Q8tG7zsi Ylcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D0gJJhDS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k29-20020aa79d1d000000b005941bb2bc16si11411675pfp.380.2023.02.06.06.04.16; Mon, 06 Feb 2023 06:04:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D0gJJhDS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231260AbjBFOAe (ORCPT + 99 others); Mon, 6 Feb 2023 09:00:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231535AbjBFOAG (ORCPT ); Mon, 6 Feb 2023 09:00:06 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFBFA27D56 for ; Mon, 6 Feb 2023 05:58:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675691917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=clH41W/lVoNcFLsG24Ai/QiAFITnKECHLPzrN7ce1sU=; b=D0gJJhDS6YwAvuqQx+Fe8FhRhts+IgIgvx01NN1EgqFrZpTD4xwzIyD7WfbfS73JzdpGfp BcDFC7Td64cSo2NSOfZwRq+bV1QNg/E+xn0kg/N/Li/Pz23Ck8XkB7c4HiWTxcuAKwslhc ibqxk2XX9m2nhzNM/oBSIoOfw54Ygeg= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-394-O690J8q5OnK8G51RWab6hg-1; Mon, 06 Feb 2023 08:58:36 -0500 X-MC-Unique: O690J8q5OnK8G51RWab6hg-1 Received: by mail-qt1-f198.google.com with SMTP id n1-20020ac85a01000000b003ba2a2c50f9so890415qta.23 for ; Mon, 06 Feb 2023 05:58:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=clH41W/lVoNcFLsG24Ai/QiAFITnKECHLPzrN7ce1sU=; b=4R1gXTahCTiLWSjnJkTFGpWnw2ny6dqiBVwl/NC93BYLwIG8uKRNyG37L6hkaSWJl0 ECUGytPoZyd7cylHI2Z7VpGNn6WE3GEKpYdXuGgT46PAgvg1irZhN1gTySJfgYpw20qA lOeCErTzzJYW5jz+5eXmNVwWcU/jWtffXIjP9SkUQdE4waDvkfKCdQg4b1nORzAG9DSc 4si2ll4VskDrDb0KdbRomY2tHlaa77E4YloHGFPbQq0cvAdMoEMT5CxQ3QrOeGTnXqVY Xq4IxsxX5c8Gt9rvJtcdMOvldgP17VwRL5tPr4/YhJTe9+a8cD+TNJVlIYowfBWdWPoa 4Sdg== X-Gm-Message-State: AO0yUKVnRPOYWyMozIB25BScnEfpMcgsnqR9aHB6IokIeUjiIjbbbHP5 Upv3ETARJ3w7bIyhbH8UgMNL08O+SbZl3zU9VZ0bNca4Mf/RrT2FLzodINeupgqcY2lwvmFLWtq Ma71eQypE9k0BVDP05UFL3lmN X-Received: by 2002:a05:622a:1206:b0:3b8:2844:b7e1 with SMTP id y6-20020a05622a120600b003b82844b7e1mr37449743qtx.46.1675691916416; Mon, 06 Feb 2023 05:58:36 -0800 (PST) X-Received: by 2002:a05:622a:1206:b0:3b8:2844:b7e1 with SMTP id y6-20020a05622a120600b003b82844b7e1mr37449726qtx.46.1675691916237; Mon, 06 Feb 2023 05:58:36 -0800 (PST) Received: from localhost.localdomain.com (024-205-208-113.res.spectrum.com. [24.205.208.113]) by smtp.gmail.com with ESMTPSA id o6-20020ac85546000000b003b2ea9b76d0sm7238344qtr.34.2023.02.06.05.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 05:58:35 -0800 (PST) From: Tom Rix To: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Rix Subject: [PATCH] soc: qcom: pmic_glink: remove redundant calculation of svid Date: Mon, 6 Feb 2023 05:58:31 -0800 Message-Id: <20230206135831.1794583-1-trix@redhat.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757090696751279769?= X-GMAIL-MSGID: =?utf-8?q?1757090696751279769?= gcc with W=1 reports drivers/soc/qcom/pmic_glink_altmode.c:223:13: error: variable ‘svid’ set but not used [-Werror=unused-but-set-variable] 223 | u16 svid; From reviewing the code, the setting of alt_port->svid does the same calculation. Both are not needed. For debuggablity, keep the setting of local svid. Signed-off-by: Tom Rix --- drivers/soc/qcom/pmic_glink_altmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/pmic_glink_altmode.c b/drivers/soc/qcom/pmic_glink_altmode.c index 71f861b8cb51..4d7895bdeaf2 100644 --- a/drivers/soc/qcom/pmic_glink_altmode.c +++ b/drivers/soc/qcom/pmic_glink_altmode.c @@ -248,7 +248,7 @@ static void pmic_glink_altmode_sc8180xp_notify(struct pmic_glink_altmode *altmod alt_port = &altmode->ports[port]; alt_port->orientation = pmic_glink_altmode_orientation(orientation); - alt_port->svid = mux == 2 ? USB_TYPEC_DP_SID : 0; + alt_port->svid = svid; alt_port->mode = mode; alt_port->hpd_state = hpd_state; alt_port->hpd_irq = hpd_irq;