Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1202124pxf; Fri, 9 Apr 2021 02:36:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyguIZ6BwCTzcWAF0lw4biUAsLPmSkkqOzO/eCA3vW2e6I7FeRGmrDLC82j51GtaHz2GoxJ X-Received: by 2002:a17:906:2da9:: with SMTP id g9mr14831501eji.100.1617960997677; Fri, 09 Apr 2021 02:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617960997; cv=none; d=google.com; s=arc-20160816; b=OWWeuihhH4YIvN3mfJa4bGH4b2FQTbRxjGKNTP71dGrdT6eKAB2YDc4B/2LCTHRJiw 3YtP4teTS8hoGZIAVyVFD4SABEXhDh0B10OdPceOSSsYZJ0Gidnifoc8w3ZURoXyveB8 dexBodzgE+hm38ajI/oQu2gDHsNzM8ISD2ct8MdpJyhSeuJ84SnfCTQF++y25QxKcBX8 8yM9iUExtr0cQTcOIOAcBcZugc9VlhEiCOUSMaXuoGzK4SluhLL4QO7L2Hh/05MtHPkd uDMdFiTMBtB9yht6nyDEQZjrm2mAJwewu/iJHdelPDN4r49JVSCf8TDovLRqxeTBMe0U DpoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=XKsUERKM55QDWOGvWL7doaBWfZMArGQOd496+J7+JY0=; b=tKmKfq7gUK570KHp7zc8s4/CZgmaNI305h/z/CUbX2pthq00Q6c90sXpNFiPZ7w/H5 zuB7GAbQ211gn7vvXHqvq6SiYucFINOkbgMpCE+FPxfktc8jeJj8wOMn2AVME0Vz5jRK wZOXRNa/EPYmUkFrEL//VhrQ2CajW1wf2r9h/qS1j8l1BhtQJazIRyehJ3Lw0j+1Zdq6 kXvhn9mX6vghovGUXJAj5n/1oZJ79S5rYG6efmy47PV8caEI3a6DHiDoyV6wYuMT5Wwf kloBgdxgEys17qvOrVubyRj3jSVlGzvYmPtqWkEPsaZdtre4XkpXoAJbDOYVeC8Tdtr2 NS8Q== 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 d3si1811635edr.484.2021.04.09.02.36.13; Fri, 09 Apr 2021 02:36:37 -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 S232292AbhDIJfX (ORCPT + 99 others); Fri, 9 Apr 2021 05:35:23 -0400 Received: from mga18.intel.com ([134.134.136.126]:48868 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231127AbhDIJfW (ORCPT ); Fri, 9 Apr 2021 05:35:22 -0400 IronPort-SDR: 5HJNt/p6ERzA1nXiZEH5FEsm/t0s7RUYW9TfE4EINLuEYZP6Jys9/4uQXD+lP2w8Gs2CrLFe/f P82uhbO2evEg== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="181261032" X-IronPort-AV: E=Sophos;i="5.82,209,1613462400"; d="scan'208";a="181261032" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2021 02:35:09 -0700 IronPort-SDR: Fw42pGcnaUcO+mqRGnPxwsl+pILV7+edI7hDYr2eg1Iyt+tjJ8waOtSH9+zYjMne7kG13BrW43 uKzK6PSAzvbg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,209,1613462400"; d="scan'208";a="520224195" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 09 Apr 2021 02:35:07 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Fri, 09 Apr 2021 12:35:06 +0300 Date: Fri, 9 Apr 2021 12:35:06 +0300 From: Heikki Krogerus To: Jiapeng Chong 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 useless variable Message-ID: References: <1617960136-95131-1-git-send-email-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1617960136-95131-1-git-send-email-jiapeng.chong@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 09, 2021 at 05:22:16PM +0800, Jiapeng Chong wrote: > Fix the following gcc warning: > > drivers/usb/typec/tcpm/tcpm.c:2107:39: warning: ‘tcpm_altmode_ops’ > defined but not used [-Wunused-const-variable=]. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > drivers/usb/typec/tcpm/tcpm.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > index ce7af39..4585785 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -2104,12 +2104,6 @@ static int tcpm_altmode_vdm(struct typec_altmode *altmode, > return 0; > } > > -static const struct typec_altmode_ops tcpm_altmode_ops = { > - .enter = tcpm_altmode_enter, > - .exit = tcpm_altmode_exit, > - .vdm = tcpm_altmode_vdm, > -}; You remove that but leave the functions. That should create even more warnings for you, because now there are no users for those functions. There is another, more complete patch for this, but I don't think we should take either of these now. We about to get a user for tcpm_altmode_ops. Br, -- heikki