Re: [PATCH] staging: r8188eu: Remove the dependency on ipx network layer
From: Dan Carpenter
Date: Mon Aug 09 2021 - 11:23:54 EST
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