Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1490555 > unrolled thread

[PATCH 6/6] mISDN: remove unused function

Started byBaoyou Xie <baoyou.xie@linaro.org>
First post2016-09-24 07:30 +0200
Last post2016-10-04 17:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 6/6] mISDN: remove unused function Baoyou Xie <baoyou.xie@linaro.org> - 2016-09-24 07:30 +0200
    Re: [PATCH 6/6] mISDN: remove unused function Arnd Bergmann <arnd@arndb.de> - 2016-10-04 17:00 +0200

#1490555 — [PATCH 6/6] mISDN: remove unused function

FromBaoyou Xie <baoyou.xie@linaro.org>
Date2016-09-24 07:30 +0200
Subject[PATCH 6/6] mISDN: remove unused function
Message-ID<skNHc-5m9-11@gated-at.bofh.it>
We get 1 warning when building kernel with W=1:
drivers/isdn/mISDN/layer2.c:463:1: warning: no previous declaration for 'IsRR' [-Wmissing-declarations]

In fact, this function is called by no one and not exported,
so this patch removes it.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/isdn/mISDN/layer2.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c
index f6ab6027..2519510 100644
--- a/drivers/isdn/mISDN/layer2.c
+++ b/drivers/isdn/mISDN/layer2.c
@@ -459,15 +459,6 @@ IsDISC(u_char *data)
 	return (data[0] & 0xef) == DISC;
 }
 
-inline int
-IsRR(u_char *data, struct layer2 *l2)
-{
-	if (test_bit(FLG_MOD128, &l2->flag))
-		return data[0] == RR;
-	else
-		return (data[0] & 0xf) == 1;
-}
-
 static inline int
 IsSFrame(u_char *data, struct layer2 *l2)
 {
-- 
2.7.4

[toc] | [next] | [standalone]


#1495460

FromArnd Bergmann <arnd@arndb.de>
Date2016-10-04 17:00 +0200
Message-ID<sozmh-4b2-7@gated-at.bofh.it>
In reply to#1490555
On Saturday, September 24, 2016 1:28:02 PM CEST Baoyou Xie wrote:
> diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c
> index f6ab6027..2519510 100644
> --- a/drivers/isdn/mISDN/layer2.c
> +++ b/drivers/isdn/mISDN/layer2.c
> @@ -459,15 +459,6 @@ IsDISC(u_char *data)
>         return (data[0] & 0xef) == DISC;
>  }
>  
> -inline int
> -IsRR(u_char *data, struct layer2 *l2)
> -{
> -       if (test_bit(FLG_MOD128, &l2->flag))
> -               return data[0] == RR;
> -       else
> -               return (data[0] & 0xf) == 1;
> -}
> -
>  static inline int
>  IsSFrame(u_char *data, struct layer2 *l2)
>  {
> -- 
> 

This is not wrong, but it might be nicer to just
make this one as 'static inline' as well like the other
ones for consistency.

Note that static inline functions don't cause a warning
when they are unused.

	Arnd

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web