Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750933AbbD3Oa7 (ORCPT ); Thu, 30 Apr 2015 10:30:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35963 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750719AbbD3Oa6 (ORCPT ); Thu, 30 Apr 2015 10:30:58 -0400 From: Jes Sorensen To: Paul Gortmaker Cc: , Greg Kroah-Hartman , Larry Finger , Florian Schilhabel Subject: Re: [PATCH 3/8] rtl8192u: don't trample on struct namespace References: <1430112341-21402-1-git-send-email-paul.gortmaker@windriver.com> <1430112341-21402-4-git-send-email-paul.gortmaker@windriver.com> <20150430142258.GK25860@windriver.com> Date: Thu, 30 Apr 2015 10:30:48 -0400 In-Reply-To: <20150430142258.GK25860@windriver.com> (Paul Gortmaker's message of "Thu, 30 Apr 2015 10:22:59 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2831 Lines: 58 Paul Gortmaker writes: > [Re: [PATCH 3/8] rtl8192u: don't trample on struct > namespace] On 30/04/2015 (Thu 09:52) Jes Sorensen wrote: > >> Paul Gortmaker writes: >> > In order to start reducing the duplicated code/constants/macros in this >> > driver, we need to include to provide the defacto >> > versions. However this driver has structs with the same name as the >> > ones in the main include, so namespace collision prevents us from doing >> > step #1. >> > >> > Since the structs actually differ in their respective fields, we can't >> > simply delete the local ones without impacting the runtime; a conversion >> > to use the global ones can be considered at a later date if desired. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> > >> > Rename the ones here with a vendor specific prefix so that we won't have >> > the namespace collision, and hence can continue on with the cleanup. >> > >> > Automated conversion done with: >> > >> > for i in `find . -name '*.[ch]'` ; do \ >> > sed -i 's/struct ieee80211_hdr/struct rtl_80211_hdr/g' $i ; \ >> > done >> > >> > Signed-off-by: Paul Gortmaker >> > --- >> > drivers/staging/rtl8192u/ieee80211/ieee80211.h | 44 +++++++------- >> > .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 10 ++-- >> > .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 26 ++++----- >> > drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 68 > +++++++++++----------- >> > .../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 32 +++++----- >> > drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 14 ++--- >> > .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 48 +++++++-------- >> > drivers/staging/rtl8192u/r8192U_core.c | 12 ++-- >> > 8 files changed, 127 insertions(+), 127 deletions(-) >> >> Rather than just renaming these headers to avoid the conflict, it seems >> to me the better solution is to convert the code to use the ieee80211.h >> provided ones from the kernel? > > That is what I said in paragraph #2 above. If someone wants to do this > later, then fine. And then it can be done incrementally and tested by > someone who has the actual hardware. In the meantime, this is better > than what was there, and since it is in staging, a realisitc expectation > is multiple small incremental improvements IMHO. Sorry too far behind on emails, I missed that part. I am fine with this approach - we just need a volunteer! Jes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/