Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp579723ybz; Wed, 15 Apr 2020 14:27:25 -0700 (PDT) X-Google-Smtp-Source: APiQypKtl3pInYbce6pv2prNhOeaG5Fm//OGDR1paGC1oqRp6QQEFQ62/3fPSr7C58NNDbHm0JAl X-Received: by 2002:a05:6402:144c:: with SMTP id d12mr26106369edx.225.1586986045180; Wed, 15 Apr 2020 14:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586986045; cv=none; d=google.com; s=arc-20160816; b=1LtAt9mQS5crrUPueAqinwt9zXoIy4+MMRssp0c86PaFks69y7nRg0jB4qW/5goTFP NWs5SJ6WdKj6LSC9KGZiLgpVk2cuBLgKj6H17MgiM1PGv81n18BCGDdyTmez0+DQMiWI m5VAQgiUsGYRF3BOE+9x7sP93tgNn31nmZC3IjXDmIQgYrbipZr7bWXW+Bav3Wwa0jqY iD5AIN2MyL+YXjdoQuH3CW8hwbFik+I2o2rBRuV0WJzr1cOcaZ0vsMaNkxkDnvBWiAOY IGc5e30ACd/Yuv3nmADXDUpOJi9xS9agempf4adGlIoekd6fvl8xaKiZBZeUORgD25T/ N7Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=YZJFwSMm1gkukssz2yvU1TmtxGnqTQKUqs0E9dhoLhE=; b=ynbxaPXpDzgI2heLaNekFUlfW5sB3ZnY1HOZbLT6f8ReY4KbE6pk0TDR658u3HGpnm BBeUX5QQZ6djr36gk+jR/B6DQxRYX7t2S1eTXhM3H5Mii9wVteJodK9nva33RlDI431B 2stqYd/x5fXUYdmhws+oZFvWtC/oP9U1xkrXCBqe1nvvJ1YhlrmebJaA1smoDHHpVu53 iXB7Zr4meZhq582m1Z9rC4RxkBilV+f5s2t9kBSET+yfSEFqVGnXz174l6ikY/TT/S/M 7gIJwipjqwaHCnsQ6w6BLNWXKIjkxq6zcj4OuTDWiTMJYwpUVfV2j8606AX48RWxqjRi KF2Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j24si6267390edt.64.2020.04.15.14.27.01; Wed, 15 Apr 2020 14:27:25 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439925AbgDNMKl (ORCPT + 99 others); Tue, 14 Apr 2020 08:10:41 -0400 Received: from mga14.intel.com ([192.55.52.115]:35090 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439918AbgDNMKg (ORCPT ); Tue, 14 Apr 2020 08:10:36 -0400 IronPort-SDR: Sbx7w2g+6r5SrxGvSFT0CSH7Bbd3kQwGbl7stQdqu0N9ssERqgPpYrVzwrmXTeTMo3ic2ZBpQr uhKhOL/w4nPQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 05:10:35 -0700 IronPort-SDR: JJ/iZDxaMqli2ikt1LKxWGxUP+IQEI+H/Zac7XRD1mQWs2IOxHrhfegmPgoCZG/yRnXx8S4iEy giePscINfvkg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,382,1580803200"; d="scan'208";a="363358155" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 14 Apr 2020 05:10:33 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Tue, 14 Apr 2020 15:10:32 +0300 Date: Tue, 14 Apr 2020 15:10:32 +0300 From: Heikki Krogerus To: Jason Yan Cc: linux@roeck-us.net, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: typec: tcpm: remove tcpm_altmode_ops and associations Message-ID: <20200414121032.GF2828150@kuha.fi.intel.com> References: <20200409085117.45819-1-yanaijie@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200409085117.45819-1-yanaijie@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Apr 09, 2020 at 04:51:17PM +0800, Jason Yan wrote: > Fix the following gcc warning: > > drivers/usb/typec/tcpm/tcpm.c:1551:39: warning: ‘tcpm_altmode_ops’ > defined but not used [-Wunused-const-variable=] > static const struct typec_altmode_ops tcpm_altmode_ops = { > ^~~~~~~~~~~~~~~~ > > Reported-by: Hulk Robot > Signed-off-by: Jason Yan This is a fix, so can you resend this with the following tag: Fixes: a079973f462a ("usb: typec: tcpm: Remove tcpc_config configuration mechanism"). Don't forget the CC stable tag as well. > --- > 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 de3576e6530a..0fcb1023bdbe 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.17.2 thanks, -- heikki