netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: netdev@vger.kernel.org
Subject: Re: [RFC PATCH net-next 0/8] Convert some skb_<foo> functions to void
Date: Mon, 04 May 2015 13:32:30 -0700	[thread overview]
Message-ID: <1430771550.2872.7.camel@perches.com> (raw)
In-Reply-To: <cover.1430769294.git.joe@perches.com>

On Mon, 2015-05-04 at 13:05 -0700, Joe Perches wrote:
> unsigned char * return values are sometimes awkward to work with.
> Changing the return to void * is sometimes clearer.
> 
> The only uses of the return type is to do sets like
>     *skb_puts(skb, 1) = char;
>     
> Adding another function specifically for that purpose allows the return
> type to become void.

Obviously, this shouldn't be applied as-is.

It spans too many subsystems and can be done
more incrementally.

Also, there are some missing conversions so
this won't compile properly (sorry 'bout that)

These will also need conversions:

drivers/isdn/i4l/isdn_ppp.c:1311:       *skb_push(skb, 4) = 1; /* indicate outbound */
drivers/net/ppp/ppp_generic.c:1208:             *skb_push(skb, 2) = 1;
drivers/net/ppp/ppp_generic.c:1843:                     *skb_push(skb, 2) = 0;
drivers/nfc/pn533.c:2601:                               *skb_push(frag, sizeof(u8)) =
drivers/nfc/pn533.c:2604:                               *skb_push(frag, sizeof(u8)) =  1; /* TG */
drivers/nfc/pn533.c:2671:                       *skb_push(skb, sizeof(u8)) =  1; /* TG */
net/nfc/digital_dep.c:152:              *skb_push(skb, sizeof(u8)) = DIGITAL_NFC_DEP_NFCA_SOD_SB;
net/nfc/digital_technology.c:1164:      *skb_push(skb, sizeof(u8)) = size + 1;
net/nfc/rawsock.c:145:  *skb_push(skb, NFC_HEADER_SIZE) = 0;

The isdn and ppp_generic uses maybe should be
2 lines each for a little better clarity.

  parent reply	other threads:[~2015-05-04 20:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04 20:05 [RFC PATCH net-next 0/8] Convert some skb_<foo> functions to void Joe Perches
2015-05-04 20:05 ` [RFC PATCH net-next 1/8] skb: Add skb_put_uchar Joe Perches
2015-05-04 20:05 ` [RFC PATCH net-next 2/8] treewide: Use skb_put_uchar Joe Perches
2015-05-04 20:05 ` [RFC PATCH net-next 3/8] skb: Add skb_push_uchar Joe Perches
2015-05-04 20:05 ` [RFC PATCH net-next 4/8] treewide: Use skb_push_uchar Joe Perches
2015-05-04 20:05 ` [RFC PATCH net-next 5/8] skbuff: Convert skb_put to return void * Joe Perches
2015-05-04 20:05 ` [RFC PATCH net-next 6/8] treewide: Remove unnecessary casts from skb_puts Joe Perches
2015-05-04 20:05 ` [RFC PATCH net-next 7/8] skbuff: Convert skb_push to return void * Joe Perches
2015-05-04 20:05 ` [RFC PATCH net-next 8/8] treewide: Remove unnecessary casts from skb_push Joe Perches
2015-05-04 20:32 ` Joe Perches [this message]
2015-05-05 23:20   ` [RFC PATCH net-next 0/8] Convert some skb_<foo> functions to void David Miller
2015-05-05 23:38     ` Joe Perches
2015-05-06 12:19       ` Eric Dumazet
2015-05-06 16:14         ` Joe Perches

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=1430771550.2872.7.camel@perches.com \
    --to=joe@perches.com \
    --cc=netdev@vger.kernel.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).