From patchwork Mon Jul 6 13:33:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 234850 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp4779314ilg; Mon, 6 Jul 2020 06:34:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIAT4gG/t5FgkIf6DfFxC53IElksmcV3L9LA0UTWPjHnXIHnU5v76Sv883SxnNSK4D/Bj1 X-Received: by 2002:a17:906:391:: with SMTP id b17mr29442234eja.282.1594042440062; Mon, 06 Jul 2020 06:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594042440; cv=none; d=google.com; s=arc-20160816; b=oBU3YexCij0qMPIyGSGR4fc4MCbAk/wn6B1Uxil/PHWGaZVAqX72CwODUGdcy+8oNc wfeRb/x4QldfnEayVqwqiCZItV/gKUdy1FAmJ9z/LukHAW+c7WO/DI5r5vVXUckRYL/Q MwmExdW6OqoNOdmhQL9A65SpuXugqjoxKmQbwR9A/z1cZXkEAAwOtJVFGmMiT8CSno4j gBNoicsQqMX/RZd3wjBWNHXzHugQfRkeI2hy8zj/BSb+Ci5BnKzUiQDMi2S3nNr89WeU ImYo/p4ukQvjUo6fFGwbJjTOnT2tMLcNxRpIJfmXjLDV+Kb6o2X/F9EDhIwCHVuX8mDX hupQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=P8CBq5D9tY/rIxd8Q9bScU/Lf3c39zfJPjGb95MJ1ho=; b=LwtZIKnWVc2szhJ9t0xbISUarTNFegmX6CufpqHS/PZQPd1eESK7uYVTUplHRdNVqQ GYEaq7OShA1PtQEkmZT2snJXl7Xhdq5RuBtXrDTQPvQ6ehYEHr+P8O1j/9Z82kuOiq2B nmYd1Dcs3rPxu1T8LnxiCoBncocutHRPQUpfILKb9VJQvfwaOay5Ip7QxWniqer10BAX gd6qvQfqBUgq7kVEZrUFoRpM0v3o0+IDwZZWE8YjFQ/+irS/pl96S9KaXLZkmE53Sswg RPvGhVvEj1cwh5bRAFVHRVpws7rW2eRlTuDBl3Uvi/LtE1ZtWEz9/FPmbmaTwMf2xeTC SFhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vTKBeOy8; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si14434094edl.117.2020.07.06.06.33.59; Mon, 06 Jul 2020 06:34:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-usb-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=@linaro.org header.s=google header.b=vTKBeOy8; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729287AbgGFNd6 (ORCPT + 5 others); Mon, 6 Jul 2020 09:33:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729276AbgGFNdz (ORCPT ); Mon, 6 Jul 2020 09:33:55 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8592EC061755 for ; Mon, 6 Jul 2020 06:33:55 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id g75so39362997wme.5 for ; Mon, 06 Jul 2020 06:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P8CBq5D9tY/rIxd8Q9bScU/Lf3c39zfJPjGb95MJ1ho=; b=vTKBeOy8iUfSZmKMM4EVVOzgbmiCgEA6KMhIW9ctG3K+ahehKKx7a1sXbFvVZtjfS6 innuNalMpnrsqCB+v/QEOP7FDE8Ix5qjbmsU7xSdjpWQDRLoEvBKLlFRGs5HkWKupr5o F/sjXi24nPO0VtY4D2xhTt/xEQPYTXmWfpNum1ncVbzONuISe7B5N2oXZLn+/JAMhw5Z QO2Fo4cOg3XCdfDsBNaMPBVmVx+jBtFeW/lsaUdDr7JemyEnLj8QFk1YWkHg6Xu3O4lQ eq2usXfgODMDCtLx9nv9djz2KGH7YngG/1Y5dAF0iGn6+u6x99vRJjfYVKZCkXX4Zsir JK8g== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=P8CBq5D9tY/rIxd8Q9bScU/Lf3c39zfJPjGb95MJ1ho=; b=cbY6o7sx2TVSv2fmmeoalqhC2GXvJlR4r3maLstSV1PzAwaeRcIPHY6S0FRUu/ujip qEJe4VZQ0OFqRLn5lcndhUVBLcO7UtnQxfJVt4VKIQ9r8uKNF8Ht53TmAYLXAnA3Q2Yt fWW7poZj0zjPNDpyrlKlUvDWZXp0hLUC/BDbjDgEK6cToOfR/tXN9Ui505qeM/5HDPcK qUcwiNQs4qI92DFct8CtsA5NZPe8v6tm40cMhU+6Ow0ry3sLfq6a97pb7P4zl5iQIbON liuvSF/CcR2cNb7R6VdTqR/TXu1swWICttWOZ86rLQRWa9Lp+LQY22Om7uYx1Oudwmzp ykpQ== X-Gm-Message-State: AOAM532bcDU7MmO9WFN+MDI9x3neW9VZKYWzlBNm/PMk45Hw69CVAgyg sr6ZrWgjpmKKRXcUntgwiuzgAlQNZUo= X-Received: by 2002:a1c:2157:: with SMTP id h84mr48334366wmh.35.1594042434299; Mon, 06 Jul 2020 06:33:54 -0700 (PDT) Received: from localhost.localdomain ([2.27.35.206]) by smtp.gmail.com with ESMTPSA id v18sm25416082wrv.49.2020.07.06.06.33.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2020 06:33:53 -0700 (PDT) From: Lee Jones To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Lee Jones , Guenter Roeck , Heikki Krogerus , Hans de Goede Subject: [PATCH 08/32] usb: typec: tcpm: tcpm: Remove dangling unused 'struct tcpm_altmode_ops' Date: Mon, 6 Jul 2020 14:33:17 +0100 Message-Id: <20200706133341.476881-9-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200706133341.476881-1-lee.jones@linaro.org> References: <20200706133341.476881-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Looks as though a079973f462a3 ("usb: typec: tcpm: Remove tcpc_config configuration mechanism") pulled out the only use of 'tcpm_altmode_ops' last year. No need to keep it around. Fixes the following W=1 kernel build warning(s): drivers/usb/typec/tcpm/tcpm.c:1551:39: warning: ‘tcpm_altmode_ops’ defined but not used [-Wunused-const-variable=] 1551 | static const struct typec_altmode_ops tcpm_altmode_ops = { | ^~~~~~~~~~~~~~~~ Cc: Guenter Roeck Cc: Heikki Krogerus Cc: Hans de Goede Signed-off-by: Lee Jones --- drivers/usb/typec/tcpm/tcpm.c | 51 ----------------------------------- 1 file changed, 51 deletions(-) -- 2.25.1 diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 82b19ebd7838e..d6913eb0ea54d 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -1503,57 +1503,6 @@ static int tcpm_validate_caps(struct tcpm_port *port, const u32 *pdo, return 0; } -static int tcpm_altmode_enter(struct typec_altmode *altmode, u32 *vdo) -{ - struct tcpm_port *port = typec_altmode_get_drvdata(altmode); - u32 header; - - mutex_lock(&port->lock); - header = VDO(altmode->svid, vdo ? 2 : 1, CMD_ENTER_MODE); - header |= VDO_OPOS(altmode->mode); - - tcpm_queue_vdm(port, header, vdo, vdo ? 1 : 0); - mod_delayed_work(port->wq, &port->vdm_state_machine, 0); - mutex_unlock(&port->lock); - - return 0; -} - -static int tcpm_altmode_exit(struct typec_altmode *altmode) -{ - struct tcpm_port *port = typec_altmode_get_drvdata(altmode); - u32 header; - - mutex_lock(&port->lock); - header = VDO(altmode->svid, 1, CMD_EXIT_MODE); - header |= VDO_OPOS(altmode->mode); - - tcpm_queue_vdm(port, header, NULL, 0); - mod_delayed_work(port->wq, &port->vdm_state_machine, 0); - mutex_unlock(&port->lock); - - return 0; -} - -static int tcpm_altmode_vdm(struct typec_altmode *altmode, - u32 header, const u32 *data, int count) -{ - struct tcpm_port *port = typec_altmode_get_drvdata(altmode); - - mutex_lock(&port->lock); - tcpm_queue_vdm(port, header, data, count - 1); - mod_delayed_work(port->wq, &port->vdm_state_machine, 0); - mutex_unlock(&port->lock); - - return 0; -} - -static const struct typec_altmode_ops tcpm_altmode_ops = { - .enter = tcpm_altmode_enter, - .exit = tcpm_altmode_exit, - .vdm = tcpm_altmode_vdm, -}; - /* * PD (data, control) command handling functions */