netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Ortiz <samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>
To: Ingo Oeser <netdev-BkyiQQGWkgE@public.gmane.org>
Cc: Jean Tourrilhes <jt-sDzT885Ts8HQT0dZR+AlfA@public.gmane.org>,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH 3/6] IrDA: IrLAP raw mode
Date: Fri, 16 Mar 2007 22:06:59 +0200	[thread overview]
Message-ID: <20070316200659.GA19314@sortiz.org> (raw)
In-Reply-To: <200703161102.06417.netdev-BkyiQQGWkgE@public.gmane.org>

Hi Ingo,

On Fri, Mar 16, 2007 at 11:02:04AM +0100, Ingo Oeser wrote:
> > --- /dev/null
> > +++ b/include/net/irda/irlap_raw.h
> > @@ -0,0 +1,27 @@
> > +/*
> > + * Copyright (C) 2007 Samuel Ortiz (samuel-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org)
> > + *
> > + * This program is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU General Public License as
> > + * published by the Free Software Foundation, version 2.
> > + *
> > + */
> > +
> > +#ifndef _IRLAP_RAW_H
> > +#define _IRLAP_RAW_H
> > +
> > +#ifdef CONFIG_IRDA_RAW
> > +
> > +int irlap_raw_recv_frame(struct sk_buff *skb, struct net_device *dev);
> > +int irlap_raw_register_device(struct net_device * dev);
> > +int irlap_raw_unregister_device(struct net_device * dev);
> > +
> > +#else
> > +
> > +#define irlap_raw_recv_frame(skbuff, netdev)
> > +#define irlap_raw_register_device(netdev)
> > +#define irlap_raw_unregister_device(netdev)
> 
> This stuff is usually done this way (functions, which just check arguments and do nothing):

Since those are exported symbols, I think it makes sense to do these checks.

> 
> I would suggest a small helper function here, which compiles into a constant, 
> if raw_mode is not compiled in.
> 
> like
This would prevent us from adding #ifdefs in the core IrDA code: I'll go for
it.

Thanks for the comments.

Cheers,
Samuel.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

      parent reply	other threads:[~2007-03-16 20:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-14 19:23 [PATCH 3/6] IrDA: IrLAP raw mode Samuel Ortiz
2007-03-16 10:02 ` Ingo Oeser
     [not found]   ` <200703161102.06417.netdev-BkyiQQGWkgE@public.gmane.org>
2007-03-16 20:06     ` Samuel Ortiz [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=20070316200659.GA19314@sortiz.org \
    --to=samuel-jcdqhdrhkhmdnm+yrofe0a@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=jt-sDzT885Ts8HQT0dZR+AlfA@public.gmane.org \
    --cc=netdev-BkyiQQGWkgE@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).