From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-fx0-f158.google.com ([209.85.220.158]:62343 "EHLO mail-fx0-f158.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752247AbZDXFhx (ORCPT ); Fri, 24 Apr 2009 01:37:53 -0400 Received: by fxm2 with SMTP id 2so915096fxm.37 for ; Thu, 23 Apr 2009 22:37:51 -0700 (PDT) To: Johannes Berg Cc: John Linville , linux-wireless Subject: Re: [PATCH] mac80211: add driver ops wrappers References: <1240505572.30082.233.camel@johannes.local> From: Kalle Valo Date: Fri, 24 Apr 2009 08:37:49 +0300 In-Reply-To: <1240505572.30082.233.camel@johannes.local> (Johannes Berg's message of "Thu\, 23 Apr 2009 18\:52\:52 +0200") Message-ID: <87y6tqd32q.fsf@litku.valot.fi> (sfid-20090424_073757_077345_ADEDB910) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-wireless-owner@vger.kernel.org List-ID: Johannes Berg writes: > In order to later add tracing or verifications to the driver > calls mac80211 makes, this patch adds static inline wrappers > for all operations. > > All calls are now written as > > drv_(local, ...); > > instead of > > local->ops->(&local->hw, ...); > > Where necessary, the wrappers also do existence checking and > return default values as appropriate. Also grepping is easier this way. I think this is a good change to have, especially I'm interested of tracing driver calls. Until now I have added debug messages to all drivers I maintain. But I'm just concerned about the drv prefix, with very bad luck it might create conflicts with some other component. What about using ieee80211_drv, for example? -- Kalle Valo