All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: gregkh@linuxfoundation.org, Larry.Finger@lwfinger.net,
	phil@philpotter.co.uk, fmdefrancesco@gmail.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: Remove the dependency on ipx network layer
Date: Mon, 9 Aug 2021 18:23:14 +0300	[thread overview]
Message-ID: <20210809152314.GT1931@kadam> (raw)
In-Reply-To: <20210809141339.2593-1-caihuoqing@baidu.com>

On Mon, Aug 09, 2021 at 10:13:39PM +0800, Cai Huoqing wrote:
> +			if (!memcmp(aarp_snap_id, framePtr, 5)) {
> +				framePtr += 5;	/*  eliminate the SNAP header */
>  
> -						DEBUG_INFO("NAT25: Protocol = IPX (Ethernet SNAP)\n");
> -						ipx = (struct ipxhdr *)framePtr;
> -					} else if (!memcmp(aarp_snap_id, framePtr, 5)) {
> -						framePtr += 5;	/*  eliminate the SNAP header */
> +				ea = (struct elapaarp *)framePtr;
> +			} else if (!memcmp(ddp_snap_id, framePtr, 5)) {
> +				framePtr += 5;	/*  eliminate the SNAP header */

To me this looks like we're still parsing an IPX header but we just
deleted the "ipx" variable and any debug output that mentions IPX.
What?

It doesn't look like nat25_handle_frame() is ever called so once you
delete that then you can delete the whole nat25_db_handle() function as
well.  I'd prefer to see that kind of function which deletes whole
functions and the compiler will complain if we delete something unused.

regards,
dan carpenter


      reply	other threads:[~2021-08-09 15:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 14:13 [PATCH] staging: r8188eu: Remove the dependency on ipx network layer Cai Huoqing
2021-08-09 15:23 ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210809152314.GT1931@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=caihuoqing@baidu.com \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.