From: Pavel Roskin <proski@gnu.org>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: lrodriguez@atheros.com, linux-wireless@vger.kernel.org,
mcgrof@infradead.org
Subject: Re: [PATCH 1/3] compat-wireless: backport convert multicast list to list_head.
Date: Sun, 18 Apr 2010 10:15:14 -0400 [thread overview]
Message-ID: <20100418101514.q7rwgz9zwgk8sg0k-cebfxv@webmail.spamcop.net> (raw)
In-Reply-To: <1271597784-4811-2-git-send-email-hauke@hauke-m.de>
Hello, Hauke!
Thank you for doing this effort! I would prefer that we avoid
patching as much as possible. Patches tend to break as the code
changes. I think there are several cases where patching can be
eliminated.
> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
> + struct netdev_hw_addr *ha;
> ++#else
> ++ struct dev_mc_list *ha;
> ++#endif
We could simply use this in some header:
#define dev_mc_list netdev_hw_addr
> + /* comoute mc addresses' hash value ,and put it into hash table */
Someone had a bout of dyslexia, and it will be fixed, breaking the patch :-)
> + netdev_for_each_mc_addr(ha, netdev) {
> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
> + hash_value = atl1c_hash_mc_addr(hw, ha->addr);
> ++#else
> ++ hash_value = atl1c_hash_mc_addr(hw, ha->dmi_addr);
> ++#endif
#define addr dmi_addr
OK, this is likely to break if done in a header, but maybe it could be
done in the C code away from the rest of the code.
> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
> + __hw_addr_unsync(&local->mc_list, &dev->mc, dev->addr_len);
> ++#else
> ++ __dev_addr_unsync(&local->mc_list, &local->mc_count,
> ++ &dev->mc_list, &dev->mc_count);
> ++#endif
Cannot we reimplement __hw_addr_unsync()?
> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
> +
> + __hw_addr_init(&local->mc_list);
> +
> ++#endif
That could be an empty function.
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2010-04-18 14:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-18 13:36 [PATCH 0/3] compat-wireless: compile fixes Hauke Mehrtens
2010-04-18 13:36 ` [PATCH 1/3] compat-wireless: backport convert multicast list to list_head Hauke Mehrtens
2010-04-18 14:15 ` Pavel Roskin [this message]
2010-04-19 18:32 ` Hauke Mehrtens
2010-04-19 20:06 ` [PATCH v2] compat: " Hauke Mehrtens
2010-04-20 0:25 ` Luis R. Rodriguez
2010-04-19 20:06 ` [PATCH v2 1/3] compat-wireless: " Hauke Mehrtens
2010-04-18 13:36 ` [PATCH 2/3] compat-wireless: Remove use of sdio quirks attribute Hauke Mehrtens
2010-04-18 13:36 ` [PATCH 3/3] compat-wireless: include net and trace includes form compat Hauke Mehrtens
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=20100418101514.q7rwgz9zwgk8sg0k-cebfxv@webmail.spamcop.net \
--to=proski@gnu.org \
--cc=hauke@hauke-m.de \
--cc=linux-wireless@vger.kernel.org \
--cc=lrodriguez@atheros.com \
--cc=mcgrof@infradead.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).