Message ID | 20230321120127.1782548-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 j10csp1750074wrt; Tue, 21 Mar 2023 05:37:55 -0700 (PDT) X-Google-Smtp-Source: AK7set9/Ak+N48yRLCykpqe7ckPswae2dQJTjU3WVvcHbzH8pO5W2Jvx0Wq55jQIxzyYW7Cs4dn9 X-Received: by 2002:a05:6a20:8b22:b0:c7:1f9b:19a0 with SMTP id l34-20020a056a208b2200b000c71f9b19a0mr1787472pzh.39.1679402274792; Tue, 21 Mar 2023 05:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679402274; cv=none; d=google.com; s=arc-20160816; b=EW8Yy0kdMCsL8PnxNO7nWPQp4K/uJWbBk6dXOTCdK5B9tw17XV+f1IsahQDo4jUmEf vIKRSmaQzqMonhTC8SvPn5gaS1qGRd4IpTpq1e7n2NqbVJCJKMANQvWaWJ9N+8bjrnrx mLoQD4T0hpicOPKr1weYWs8+ddGz+squ//G+BQPxysO2LOrTBzTK7YCFQ/BCpEy9HF8j rFuUq1bzzW99PSCgCfKr37EcF5LtpYuHFGjmk+rCla8cl6Em2Dso1zw+hEcMYRNZ1nzQ 7uqR5k00jy0fakwr9HITbWk6LqLzyyJQAdAX3HprgKWvJ2cYMJAmzUgNj975UPUCCVZ2 fvAw== 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=ZUORpevlKQiU73IYOa4/Bo2bFBpxSB0mQvJe2zWG4uk=; b=qEm3Sd1iSq0ISxsP28zJ3xARZDvHPRL4RlUdAS2dw9Tz0OIT8/n4fwRhBpKuNLs+oc E7m7yoqmsGHkXHl91Uu2Bn6qdqzbkVeXkGWMygjhdfm3s2w1rtU4Ee6bc8RDLe5zhDUw RPfkyhesbx+e5LT9zg1kqujmsiZmv74JCltJO0W+LdSQrvqEfOeo47NMCtlG2W7DNOH7 hgwdQoMKRo4kwetnfxNyP6zMSWCmVJapERIojtAW9s4ulAB6X2nB+q72vTj70BxB5GgL IrQDwtIx3hyPCt8M7ke0XnPTZ5Fss4ZGWS2Eunb0P+2sZ1R+6J4Adp50/q9kMHGV4hT5 iedw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Y/IzGBiy"; 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 p5-20020a631e45000000b004fc274006ddsi12639541pgm.670.2023.03.21.05.37.39; Tue, 21 Mar 2023 05:37:54 -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="Y/IzGBiy"; 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 S229670AbjCUMCX (ORCPT <rfc822;ezelljr.billy@gmail.com> + 99 others); Tue, 21 Mar 2023 08:02:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230233AbjCUMCV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 21 Mar 2023 08:02:21 -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 3C4A61AB for <linux-kernel@vger.kernel.org>; Tue, 21 Mar 2023 05:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679400094; 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=ZUORpevlKQiU73IYOa4/Bo2bFBpxSB0mQvJe2zWG4uk=; b=Y/IzGBiy15N7O0jpNnT2O945RsbGl/EWX7eEgm8i9ZazEH8avNVBGgLQaCYrW3NEQEo4wN hUpjgFlu7gGLpe8vnBzPuahqM6sloeO8SA728GdKXbP24XOoq8yjj7NHNjXEaSTPuDjcX0 UdnjEMoDOKOjLP67bh+9+46vMQeByYY= Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-665-52L5XCVqM56TWRX52YzHjw-1; Tue, 21 Mar 2023 08:01:31 -0400 X-MC-Unique: 52L5XCVqM56TWRX52YzHjw-1 Received: by mail-ot1-f72.google.com with SMTP id g19-20020a056830161300b0069d6fbb1a72so6736471otr.11 for <linux-kernel@vger.kernel.org>; Tue, 21 Mar 2023 05:01:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679400091; 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=ZUORpevlKQiU73IYOa4/Bo2bFBpxSB0mQvJe2zWG4uk=; b=hKK41xGAkn2yhi3k9G/GNdonF94lrS+2Yvcma3Gc+R66PRM4eZDIUlopXIFG00C5I9 tEWsahxetBs1sk1/XP63bbGXttRsmz6llJkbOca5I3+M/YX66Uz5FtvVmMpj/uZFkmGF j/4oOyntYdsWnK8a5MCSNe1kb3SXFdmx9fTPspAxRpdQvLSqLSzgj6Zw3Uxq0x0Bg69Q Hq7hZBYGKZ7y5NYS2RwvS9I01fe9lZgCZqlk1p/SRb+qxvoTYOB9Ge74lO5r4gC7Rvhu /4UagTdAt16mV6AKhkVgZ6X9TooACqsTUKvj+svXY/6RxvAlloQ249J3fimtitaUet2b 6PDQ== X-Gm-Message-State: AO0yUKWPgGdUCK6PpHPl4UjNP8SynyjKmQcicEOYJ5wYVq14hZw2hqKj MRforthU44dbM58LQCpW3NArh5TPuehNTrkPYDD7hgycWnhw71nQpYShXp1opC8p7QaPxQeqFxy rR1+7AnPnzxX3lrXTYpWgbIzg X-Received: by 2002:a05:6870:8289:b0:176:263e:9965 with SMTP id q9-20020a056870828900b00176263e9965mr871698oae.44.1679400091074; Tue, 21 Mar 2023 05:01:31 -0700 (PDT) X-Received: by 2002:a05:6870:8289:b0:176:263e:9965 with SMTP id q9-20020a056870828900b00176263e9965mr871660oae.44.1679400090393; Tue, 21 Mar 2023 05:01:30 -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 t72-20020a37464b000000b00725d8d6983asm9163201qka.61.2023.03.21.05.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 05:01:30 -0700 (PDT) From: Tom Rix <trix@redhat.com> To: isdn@linux-pingi.de, nathan@kernel.org, ndesaulniers@google.com, kuba@kernel.org, alexanderduyck@fb.com, yangyingliang@huawei.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Tom Rix <trix@redhat.com> Subject: [PATCH] mISDN: remove unused vpm_read_address function Date: Tue, 21 Mar 2023 08:01:27 -0400 Message-Id: <20230321120127.1782548-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=-2.1 required=5.0 tests=BAYES_00,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?1760980919237756737?= X-GMAIL-MSGID: =?utf-8?q?1760980919237756737?= |
Series |
mISDN: remove unused vpm_read_address function
|
|
Commit Message
Tom Rix
March 21, 2023, 12:01 p.m. UTC
clang with W=1 reports
drivers/isdn/hardware/mISDN/hfcmulti.c:667:1: error: unused function
'vpm_read_address' [-Werror,-Wunused-function]
vpm_read_address(struct hfc_multi *c)
^
This function is not used, so remove it.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/isdn/hardware/mISDN/hfcmulti.c | 14 --------------
1 file changed, 14 deletions(-)
Comments
On Tue, Mar 21, 2023 at 08:01:27AM -0400, Tom Rix wrote: > clang with W=1 reports > drivers/isdn/hardware/mISDN/hfcmulti.c:667:1: error: unused function > 'vpm_read_address' [-Werror,-Wunused-function] > vpm_read_address(struct hfc_multi *c) > ^ > This function is not used, so remove it. Yes, agreed. But with this patch applied, make CC=clang W=1 tells me: CALL scripts/checksyscalls.sh CC [M] drivers/isdn/hardware/mISDN/hfcmulti.o drivers/isdn/hardware/mISDN/hfcmulti.c:643:1: error: unused function 'cpld_read_reg' [-Werror,-Wunused-function] So perhaps cpld_read_reg should be removed too?
On 3/22/23 6:20 AM, Simon Horman wrote: > On Tue, Mar 21, 2023 at 08:01:27AM -0400, Tom Rix wrote: >> clang with W=1 reports >> drivers/isdn/hardware/mISDN/hfcmulti.c:667:1: error: unused function >> 'vpm_read_address' [-Werror,-Wunused-function] >> vpm_read_address(struct hfc_multi *c) >> ^ >> This function is not used, so remove it. > Yes, agreed. > > But with this patch applied, make CC=clang W=1 tells me: > > CALL scripts/checksyscalls.sh > CC [M] drivers/isdn/hardware/mISDN/hfcmulti.o > drivers/isdn/hardware/mISDN/hfcmulti.c:643:1: error: unused function 'cpld_read_reg' [-Werror,-Wunused-function] > > So perhaps cpld_read_reg should be removed too? Yes, i will add and respin. Thanks, Tom >
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index e840609c50eb..ac665cf64f8c 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c @@ -663,20 +663,6 @@ vpm_write_address(struct hfc_multi *hc, unsigned short addr) cpld_write_reg(hc, 1, 0x01 & (addr >> 8)); } -static inline unsigned short -vpm_read_address(struct hfc_multi *c) -{ - unsigned short addr; - unsigned short highbit; - - addr = cpld_read_reg(c, 0); - highbit = cpld_read_reg(c, 1); - - addr = addr | (highbit << 8); - - return addr & 0x1ff; -} - static inline unsigned char vpm_in(struct hfc_multi *c, int which, unsigned short addr) {