* [PATCH] mISDN: remove unused vpm_read_address function
@ 2023-03-21 12:01 Tom Rix
2023-03-22 13:20 ` Simon Horman
0 siblings, 1 reply; 3+ messages in thread
From: Tom Rix @ 2023-03-21 12:01 UTC (permalink / raw)
To: isdn, nathan, ndesaulniers, kuba, alexanderduyck, yangyingliang
Cc: netdev, linux-kernel, llvm, Tom Rix
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(-)
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)
{
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mISDN: remove unused vpm_read_address function
2023-03-21 12:01 [PATCH] mISDN: remove unused vpm_read_address function Tom Rix
@ 2023-03-22 13:20 ` Simon Horman
2023-03-23 15:18 ` Tom Rix
0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2023-03-22 13:20 UTC (permalink / raw)
To: Tom Rix
Cc: isdn, nathan, ndesaulniers, kuba, alexanderduyck, yangyingliang,
netdev, linux-kernel, llvm
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mISDN: remove unused vpm_read_address function
2023-03-22 13:20 ` Simon Horman
@ 2023-03-23 15:18 ` Tom Rix
0 siblings, 0 replies; 3+ messages in thread
From: Tom Rix @ 2023-03-23 15:18 UTC (permalink / raw)
To: Simon Horman
Cc: isdn, nathan, ndesaulniers, kuba, alexanderduyck, yangyingliang,
netdev, linux-kernel, llvm
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-23 15:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 12:01 [PATCH] mISDN: remove unused vpm_read_address function Tom Rix
2023-03-22 13:20 ` Simon Horman
2023-03-23 15:18 ` Tom Rix
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).