netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Inaky Perez-Gonzalez <inaky@linux.intel.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: netdev@vger.kernel.org, wimax@linuxwimax.org, greg@kroah.com
Subject: Re: [PATCH 07/29] wimax: basic API: kernel/user messaging, rfkill and reset
Date: Mon, 8 Dec 2008 13:24:17 -0800	[thread overview]
Message-ID: <200812081324.17703.inaky@linux.intel.com> (raw)
In-Reply-To: <1228766499.22164.123.camel@johannes.berg>

On Monday 08 December 2008, Johannes Berg wrote:
> On Mon, 2008-12-08 at 11:09 -0800, Inaky Perez-Gonzalez wrote:
 >
> > +struct sk_buff *wimax_pipe_msg_alloc(struct wimax_dev *wimax_dev,
> > +				     const void *msg, size_t size,
> > +				     gfp_t gfp_flags)
...
> > +	might_sleep();
> > +	d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info);
> > +	result = -EPERM;
> > +	if (security_netlink_recv(skb, CAP_NET_ADMIN))
> > +		goto error_perm;
>
> perms check?

Ouch, sorry, right; wonder how I missed this one.

>
> > +	result = -ENODEV;
> > +	wimax_dev = wimax_dev_get_by_genl_info(info);
> > +	if (wimax_dev == NULL)
> > +		goto error_no_wimax_dev;
> >
> >
> > +	result = wimax_dev->op_msg_from_user(wimax_dev, msg_buf, msg_len,
> > info); +error_noop:
> > +error_not_ready:
> > +	mutex_unlock(&wimax_dev->mutex);
> > +error_no_data:
> > +	dev_put(wimax_dev->net_dev);
> > +error_no_wimax_dev:
> > +error_perm:
> > +	d_fnend(3, NULL, "(skb %p info %p) = %d\n", skb, info, result);
> > +	return result;
>
> Do you really need all the fnstart/fnend debugging everywhere? Isn't
> this easily covered by ftrace nowadays? If you remove that you can very
> much simplify the code by using "return -ESOMETHING" instead of jumping
> to a label in many of these functions.

ftrace: ack -- just let it stabilize a couple of versions (/me thinks e1000
fiasco), then I'll happily get rid of them.

-- 
Inaky

  reply	other threads:[~2008-12-08 21:24 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 19:09 [PATCH 00/29] merge request for WiMAX kernel stack and i2400m driver v3 Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 01/29] wimax: documentation for the stack Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 02/29] wimax: headers for kernel API and user space interaction Inaky Perez-Gonzalez
2008-12-08 20:05   ` Johannes Berg
2008-12-08 21:22     ` Inaky Perez-Gonzalez
2008-12-08 23:29       ` Johannes Berg
2008-12-08 19:09 ` [PATCH 03/29] wimax: internal API for the kernel space WiMAX stack Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 04/29] wimax: debug macros and debug settings for the " Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 05/29] wimax: generic device management (registration, deregistration, lookup) Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 06/29] genetlink: export genl_unregister_mc_group() Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 07/29] wimax: basic API: kernel/user messaging, rfkill and reset Inaky Perez-Gonzalez
2008-12-08 20:01   ` Johannes Berg
2008-12-08 21:24     ` Inaky Perez-Gonzalez [this message]
2008-12-08 19:09 ` [PATCH 08/29] debugfs: add helpers for exporting a size_t simple value Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 09/29] wimax: debugfs controls Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 10/29] wimax: Makefile, Kconfig and docbook linkage for the stack Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 11/29] i2400m: documentation and instructions for usage Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 12/29] i2400m: host/device procotol and core driver definitions Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 13/29] i2400m: Generic probe/disconnect, reset and message passing Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 14/29] i2400m: linkage to the networking stack Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 15/29] i2400m: firmware loading and bootrom initialization Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 16/29] i2400m: RX and TX data/control paths Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 17/29] i2400m: various functions for device management Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 18/29] i2400m: debugfs controls Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 19/29] i2400m/USB: header for the USB bus driver Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 20/29] i2400m/USB: probe/disconnect, dev init/shutdown and reset backends Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 21/29] i2400m/USB: firmware upload backend Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 22/29] i2400m/USB: TX and RX path backends Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 23/29] i2400m/SDIO: header for the SDIO subdriver Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 24/29] i2400m/SDIO: probe/disconnect, dev init/shutdown and reset backends Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 25/29] i2400m/SDIO: firmware upload backend Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 26/29] i2400m/SDIO: TX and RX path backends Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 27/29] i2400m: Makefile and Kconfig Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 28/29] wimax: export linux/wimax.h and linux/wimax/i2400m.h with headers_install Inaky Perez-Gonzalez
2008-12-08 19:09 ` [PATCH 29/29] wimax/i2400m: add CREDITS and MAINTAINERS entries Inaky Perez-Gonzalez
2008-12-15 11:37 ` [PATCH 00/29] merge request for WiMAX kernel stack and i2400m driver v3 Thomas Graf
  -- strict thread matches above, loose matches on Subject: below --
2008-12-10 23:12 [PATCH 00/29] merge request for WiMAX kernel stack and i2400m driver v4 Inaky Perez-Gonzalez
2008-12-10 23:12 ` [PATCH 07/29] wimax: basic API: kernel/user messaging, rfkill and reset Inaky Perez-Gonzalez
2008-12-15 12:57 [PATCH 00/29] merge request for WiMAX kernel stack and i2400m driver v6 Inaky Perez-Gonzalez
2008-12-15 12:58 ` [PATCH 07/29] wimax: basic API: kernel/user messaging, rfkill and reset Inaky Perez-Gonzalez
2008-12-21  0:57 [PATCH 00/29] merge request for WiMAX kernel stack and i2400m driver v7 Inaky Perez-Gonzalez
2008-12-21  0:57 ` [PATCH 07/29] wimax: basic API: kernel/user messaging, rfkill and reset Inaky Perez-Gonzalez

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=200812081324.17703.inaky@linux.intel.com \
    --to=inaky@linux.intel.com \
    --cc=greg@kroah.com \
    --cc=johannes@sipsolutions.net \
    --cc=netdev@vger.kernel.org \
    --cc=wimax@linuxwimax.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).