Message ID | 20230322122855.2570417-1-trix@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2321327wrt; Wed, 22 Mar 2023 05:47:12 -0700 (PDT) X-Google-Smtp-Source: AK7set93ZnYI4AfNDJYMnybr7MAv7E8MoSZ5H4yNJ/xs98meqQQv90gPX8EVBYBkmDWHMqqq03fM X-Received: by 2002:a62:cf83:0:b0:622:7e20:71d with SMTP id b125-20020a62cf83000000b006227e20071dmr2699808pfg.17.1679489232556; Wed, 22 Mar 2023 05:47:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679489232; cv=none; d=google.com; s=arc-20160816; b=B4gR1yYC4yl7byAocjO9/Vs/dKjT1YLKtnZtugPwYBKrVs4oAYU+SFe0BDh6Hemk5V t3ltMBZzH1TuiwjQndRnxtlwQlSFqIS7eCh/Dk+k6OnIyJbP1QGpveDTTQ4WITa18aJd loukCcmLtC0oISv9Sfit7aTNeDaqMLQh4pYHuIMEUri2OOBc5jh+Z0VqhPTmtLg1Hkes YjMNRRHDHtDlMxtWBtmwE38hNc5ZcnrDqPibXg+lCpkVrABIZEQXcMEkAgLMXTVut9Hz wS9OdeWuxKYt/4lfD7Db+jF8BozjQYFD/7oksbOO80LYE9RNnLf/9OLDzkqlKdAkblgg G5QA== 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=/RmaCdFiflknr5F/EzALZWl8EQAEMlohlo+Bq/6n784=; b=iNbiYe8tkiyVay3yyBEymdn3Kt5aAh0qA7ZaxRw/Q4a3RYSQH7dSEqSBZnqU3cnvhi kX8PG4dMNePELeixgt26RJUVLq+FFUsUe4ZCGFvwiHigGYFVQpZi59yS4zDjOT5/ef82 mTQBRlEh5sLdul9clKrVzaWi12DPdkSWDfksmYOsBiAdQejDKnHet26TA+CPVvFdtATU mbVGVfpIJ4fpG40RakOMe4AvaBL82ZbMa+1Csz8ffkM/59Pu9+lquWpS8K+/t4bidK3q 1mDu71nXHiii2c3wIqPbIhltuBGdYJMk8lPuwNNOqqgBpjB/RcfyxKzHwCo8wHHTifip xvtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IGRiaXY4; 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 bs128-20020a632886000000b0050f6a7e7d86si10393283pgb.519.2023.03.22.05.47.00; Wed, 22 Mar 2023 05:47:12 -0700 (PDT) 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=IGRiaXY4; 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 S229691AbjCVM3u (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Wed, 22 Mar 2023 08:29:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229719AbjCVM3t (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Mar 2023 08:29:49 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CC9734C38 for <linux-kernel@vger.kernel.org>; Wed, 22 Mar 2023 05:29:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679488140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/RmaCdFiflknr5F/EzALZWl8EQAEMlohlo+Bq/6n784=; b=IGRiaXY47/CqfQ0HhrV9YXycAt4KYHUdiaYitJlJoN7/+XZUvAlCO1iMkYBinss56kGpGa I4VfKnY1V4KbvSmUIJIRMYVBqB1s6p2S0mASlZ/PXfsonM0pQGzWH+3UHIak4lL0kzT2Ui AQa5juRrC8KEnTtunlpOkaxNBguWy6c= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-119-Bdx8tM68P1OWCdIqpFDIvg-1; Wed, 22 Mar 2023 08:28:58 -0400 X-MC-Unique: Bdx8tM68P1OWCdIqpFDIvg-1 Received: by mail-qt1-f197.google.com with SMTP id s4-20020a05622a1a8400b003dbc6fc558aso8446623qtc.3 for <linux-kernel@vger.kernel.org>; Wed, 22 Mar 2023 05:28:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679488138; 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=/RmaCdFiflknr5F/EzALZWl8EQAEMlohlo+Bq/6n784=; b=MT3ei08tWfYKnojRzB4Tzrgj1d2c4tXAIrxQwMDA/D+mXHmb7o5zbkiQzVBPyusj+z 68LAd9QTe+qmFXer1Mo9guvz0DKsIkToRUDx8WhwZx8+jMM37SkbuuJRAgr/QhXZsroh 961+Abqt4RLRBM+5cv5Qtq2NGb+JdGkIJ2iyT7v0gyesw9zrNKex9DifRqJzteTDGBZo 5xtLqetXkbv88QzFOsN00GjxlGNG8V1xdoyOOCQlvvwoHv2mk/6VqkZRuvI0qmrQ3tQj eS50dfZKZyY8WcCMUzU8/j093Shl2X569DrrDvWiOPgsccWt008WKjTWnrNJvK9wfgod RDZA== X-Gm-Message-State: AO0yUKX7Rw9OZNHi8OQWBazweFvSe4XxAuW6I3nirSL/Lpje8qKVBR7f vAv2tR+8U6XB9ABzy/ptAbZLUP64QvMbAyOaCHKdgA55kPjw71GLWAdXR0HAzg02XcO0kVuYduY uyl8+/cMydupGME9nvWwS5M5s X-Received: by 2002:ac8:7f8e:0:b0:3bf:d9d2:484f with SMTP id z14-20020ac87f8e000000b003bfd9d2484fmr5698836qtj.11.1679488138426; Wed, 22 Mar 2023 05:28:58 -0700 (PDT) X-Received: by 2002:ac8:7f8e:0:b0:3bf:d9d2:484f with SMTP id z14-20020ac87f8e000000b003bfd9d2484fmr5698812qtj.11.1679488138211; Wed, 22 Mar 2023 05:28:58 -0700 (PDT) Received: from dell-per740-01.7a2m.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id j13-20020a37ef0d000000b00729b7d71ac7sm11174245qkk.33.2023.03.22.05.28.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 05:28:57 -0700 (PDT) From: Tom Rix <trix@redhat.com> To: kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, nathan@kernel.org, ndesaulniers@google.com Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Tom Rix <trix@redhat.com> Subject: [PATCH] ath10k: remove unused ath10k_get_ring_byte function Date: Wed, 22 Mar 2023 08:28:55 -0400 Message-Id: <20230322122855.2570417-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761072101801075255?= X-GMAIL-MSGID: =?utf-8?q?1761072101801075255?= |
Series |
ath10k: remove unused ath10k_get_ring_byte function
|
|
Commit Message
Tom Rix
March 22, 2023, 12:28 p.m. UTC
clang with W=1 reports
drivers/net/wireless/ath/ath10k/ce.c:88:1: error:
unused function 'ath10k_get_ring_byte' [-Werror,-Wunused-function]
ath10k_get_ring_byte(unsigned int offset,
^
This function is not used so remove it.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/net/wireless/ath/ath10k/ce.c | 7 -------
1 file changed, 7 deletions(-)
Comments
On Wed, Mar 22, 2023 at 08:28:55AM -0400, Tom Rix wrote: > clang with W=1 reports > drivers/net/wireless/ath/ath10k/ce.c:88:1: error: > unused function 'ath10k_get_ring_byte' [-Werror,-Wunused-function] > ath10k_get_ring_byte(unsigned int offset, > ^ > This function is not used so remove it. > > Signed-off-by: Tom Rix <trix@redhat.com> Hi Tom, this looks good. But this patch applied, and with clang 11.0.2, make CC=clang W=1 tells me: drivers/net/wireless/ath/ath10k/ce.c:80:19: error: unused function 'shadow_dst_wr_ind_addr' [-Werror,-Wunused-function] static inline u32 shadow_dst_wr_ind_addr(struct ath10k *ar, ^ drivers/net/wireless/ath/ath10k/ce.c:434:20: error: unused function 'ath10k_ce_error_intr_enable' [-Werror,-Wunused-function] static inline void ath10k_ce_error_intr_enable(struct ath10k *ar, ^ Perhaps those functions should be removed too? > --- > drivers/net/wireless/ath/ath10k/ce.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c > index b656cfc03648..c27b8204718a 100644 > --- a/drivers/net/wireless/ath/ath10k/ce.c > +++ b/drivers/net/wireless/ath/ath10k/ce.c > @@ -84,13 +84,6 @@ ath10k_set_ring_byte(unsigned int offset, > return ((offset << addr_map->lsb) & addr_map->mask); > } > > -static inline unsigned int > -ath10k_get_ring_byte(unsigned int offset, > - struct ath10k_hw_ce_regs_addr_map *addr_map) > -{ > - return ((offset & addr_map->mask) >> (addr_map->lsb)); > -} > - > static inline u32 ath10k_ce_read32(struct ath10k *ar, u32 offset) > { > struct ath10k_ce *ce = ath10k_ce_priv(ar); > -- > 2.27.0 >
On 3/22/23 1:40 PM, Simon Horman wrote: > On Wed, Mar 22, 2023 at 08:28:55AM -0400, Tom Rix wrote: >> clang with W=1 reports >> drivers/net/wireless/ath/ath10k/ce.c:88:1: error: >> unused function 'ath10k_get_ring_byte' [-Werror,-Wunused-function] >> ath10k_get_ring_byte(unsigned int offset, >> ^ >> This function is not used so remove it. >> >> Signed-off-by: Tom Rix <trix@redhat.com> > Hi Tom, > > this looks good. But this patch applied, and with clang 11.0.2, > make CC=clang W=1 tells me: > > drivers/net/wireless/ath/ath10k/ce.c:80:19: error: unused function 'shadow_dst_wr_ind_addr' [-Werror,-Wunused-function] > static inline u32 shadow_dst_wr_ind_addr(struct ath10k *ar, > ^ > drivers/net/wireless/ath/ath10k/ce.c:434:20: error: unused function 'ath10k_ce_error_intr_enable' [-Werror,-Wunused-function] > static inline void ath10k_ce_error_intr_enable(struct ath10k *ar, > ^ > Perhaps those functions should be removed too? I believe these were removed with c3ab8c9a296 ("wifi: ath10k: Remove the unused function shadow_dst_wr_ind_addr() and ath10k_ce_error_intr_enable()") Tom > >> --- >> drivers/net/wireless/ath/ath10k/ce.c | 7 ------- >> 1 file changed, 7 deletions(-) >> >> diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c >> index b656cfc03648..c27b8204718a 100644 >> --- a/drivers/net/wireless/ath/ath10k/ce.c >> +++ b/drivers/net/wireless/ath/ath10k/ce.c >> @@ -84,13 +84,6 @@ ath10k_set_ring_byte(unsigned int offset, >> return ((offset << addr_map->lsb) & addr_map->mask); >> } >> >> -static inline unsigned int >> -ath10k_get_ring_byte(unsigned int offset, >> - struct ath10k_hw_ce_regs_addr_map *addr_map) >> -{ >> - return ((offset & addr_map->mask) >> (addr_map->lsb)); >> -} >> - >> static inline u32 ath10k_ce_read32(struct ath10k *ar, u32 offset) >> { >> struct ath10k_ce *ce = ath10k_ce_priv(ar); >> -- >> 2.27.0 >>
On Thu, Mar 23, 2023 at 07:18:09AM -0700, Tom Rix wrote: > > On 3/22/23 1:40 PM, Simon Horman wrote: > > On Wed, Mar 22, 2023 at 08:28:55AM -0400, Tom Rix wrote: > > > clang with W=1 reports > > > drivers/net/wireless/ath/ath10k/ce.c:88:1: error: > > > unused function 'ath10k_get_ring_byte' [-Werror,-Wunused-function] > > > ath10k_get_ring_byte(unsigned int offset, > > > ^ > > > This function is not used so remove it. > > > > > > Signed-off-by: Tom Rix <trix@redhat.com> > > Hi Tom, > > > > this looks good. But this patch applied, and with clang 11.0.2, > > make CC=clang W=1 tells me: > > > > drivers/net/wireless/ath/ath10k/ce.c:80:19: error: unused function 'shadow_dst_wr_ind_addr' [-Werror,-Wunused-function] > > static inline u32 shadow_dst_wr_ind_addr(struct ath10k *ar, > > ^ > > drivers/net/wireless/ath/ath10k/ce.c:434:20: error: unused function 'ath10k_ce_error_intr_enable' [-Werror,-Wunused-function] > > static inline void ath10k_ce_error_intr_enable(struct ath10k *ar, > > ^ > > Perhaps those functions should be removed too? > > I believe these were removed with > > c3ab8c9a296 ("wifi: ath10k: Remove the unused function > shadow_dst_wr_ind_addr() and ath10k_ce_error_intr_enable()") Sorry, my bad. You are correct. Patch looks good to me (now). Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tom Rix <trix@redhat.com> wrote: > clang with W=1 reports: > > drivers/net/wireless/ath/ath10k/ce.c:88:1: error: > unused function 'ath10k_get_ring_byte' [-Werror,-Wunused-function] > ath10k_get_ring_byte(unsigned int offset, > ^ > This function is not used so remove it. > > Signed-off-by: Tom Rix <trix@redhat.com> > Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Patch applied to ath-next branch of ath.git, thanks. 9fc093b756f6 wifi: ath10k: remove unused ath10k_get_ring_byte function
diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c index b656cfc03648..c27b8204718a 100644 --- a/drivers/net/wireless/ath/ath10k/ce.c +++ b/drivers/net/wireless/ath/ath10k/ce.c @@ -84,13 +84,6 @@ ath10k_set_ring_byte(unsigned int offset, return ((offset << addr_map->lsb) & addr_map->mask); } -static inline unsigned int -ath10k_get_ring_byte(unsigned int offset, - struct ath10k_hw_ce_regs_addr_map *addr_map) -{ - return ((offset & addr_map->mask) >> (addr_map->lsb)); -} - static inline u32 ath10k_ce_read32(struct ath10k *ar, u32 offset) { struct ath10k_ce *ce = ath10k_ce_priv(ar);