Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp163661ybt; Mon, 6 Jul 2020 06:34:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVkOaYbSlFIDkZmFA8dHTks9jxYYBTjc3iQrR0Z2jPRiXkbNwA9dcgXsW8x3ViciDAc+dp X-Received: by 2002:a50:f418:: with SMTP id r24mr50151635edm.382.1594042489699; Mon, 06 Jul 2020 06:34:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594042489; cv=none; d=google.com; s=arc-20160816; b=L/ZvvuVEXWGElBmtPv8sROEKRZH5jsYvp5YR80IKL2yy5plib2yV4xg2eK7WPBLnXT Trkcp69LGWiLgiaCoGb7TdKLXN+q9lON0nqg0JSYwrD41yptn+pjh+myLT5bXr4vZtDL 3W5PYHFnuJj1CvQIAHsid8Bqtb0izciwQjOOMxNL3q6VtCpoApPx0aSj/7N+o4ybZaXb uwzUXbRHLGXN+39OIpaOL1nU1XIhcMdzcY9dLOkxXtddV75sWiwImttNgLlNXv/u2r+1 CS8Mpc+iHWYXhTyLCVtJcY1CRcUgS1roc50F0N4QEk8jgx7R8/ApXkPU886MACa+2IZv BnOw== 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=aX1nxeK4nt4kkwHGxzOsVpuJPhpl11ttFoB/9EmJYf/VUqTHyItodgsocbC/gl1Bb6 DZRhFJ822ad/TgNnjpJOnay2j1/i6y66mqeDVbbKamob+NFy3ZPE+eBt0z14y3jjLtwx JGS9HV+yAWdseKh7vjUtp9zI2bUJauqiu8DgjuwiIDa4af559J4FvLv4fPOIEUXvBVSt QAh7OefbAbOs6ZHz/f68jK08Aixjs+KxszGPrWryPf4D+i9ziYa6PtTt0nZGdFP54CTE KDjtBD30fnpfwAfxiBiHnuReBLssxhZTMeBHARA+wieBZxGtVrjLoOAOHBUUsWCi6Y/h QdPw== 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-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=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 s21si12500416edy.104.2020.07.06.06.34.27; Mon, 06 Jul 2020 06:34:49 -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=@linaro.org header.s=google header.b=vTKBeOy8; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729303AbgGFNeC (ORCPT + 99 others); Mon, 6 Jul 2020 09:34:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729274AbgGFNdz (ORCPT ); Mon, 6 Jul 2020 09:33:55 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85986C08C5DF for ; Mon, 6 Jul 2020 06:33:55 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id f18so42148266wml.3 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=Al8xFDP2rdTdTmvCN3aIQJSC8mmz6xiisu580oN3vetjqrgjO07sfG7KfcnCgfFnpK wRLK4b21HqqAdJAeVSIEaQEaZiGhbPwybZbrtHDT/lU7IEmuxcwT0HO9sDq6ETibRXef 23IebrqxZ79UNBldfUL3M57aY8rYnBw9rcB0ypjasI1F9c5bttatXEm5DO2TMQEV8DCs FgSL4Ix9hdr2Tc2X9o4pNegyfh4tn/nY8iU9D6Ob48ULtICuUPxweFQSo7V8NQyGZtZx BLC9JUWGWXGqnnEf9B181j5vZ5CYqBa03xbIVY7nxs4/D2lbM1Mm9ZYxJcw6ILRuto2y N5SA== X-Gm-Message-State: AOAM531ZVJHqZ3zttpEZZJqP+B4rJwjl17IdLB+KXPbEUXk+3q1mzXH4 PuLNuTKGPs/41f3e3PWbWtyV0w== 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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 */ -- 2.25.1