* [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings
@ 2014-11-02 20:43 Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 1/6] ieee802154: add missing ULL definition Alexander Aring
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Alexander Aring @ 2014-11-02 20:43 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
This patch series fixes warning when building with "make C=2". This was
reported by Marcel Holtmann which told me to run "make C=2" and solve
these warnings. Most of the issues was forgotten includes and byte ordering
handling.
Alexander Aring (6):
ieee802154: add missing ULL definition
ieee802154: fix byteorder issues
mac802154: fix byteorder issues
ieee802154: sysfs: add missing include
mac802154: cfg: add missing include
ieee802154: remove unnecessary functions
include/linux/ieee802154.h | 4 +++-
include/net/mac802154.h | 6 +++---
net/ieee802154/sysfs.c | 1 +
net/mac802154/cfg.c | 1 +
net/mac802154/iface.c | 22 ----------------------
5 files changed, 8 insertions(+), 26 deletions(-)
--
2.1.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH bluetooth-next 1/6] ieee802154: add missing ULL definition
2014-11-02 20:43 [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings Alexander Aring
@ 2014-11-02 20:43 ` Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 2/6] ieee802154: fix byteorder issues Alexander Aring
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Alexander Aring @ 2014-11-02 20:43 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
Running make C=2 occurs warning:
constant 0xffffffffffffffff is so big it is unsigned long
This patch fix this warning by adding a ULL to the constant definitions.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reported-by: Marcel Holtmann <marcel@holtmann.org>
---
include/linux/ieee802154.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/ieee802154.h b/include/linux/ieee802154.h
index 9bba5ca..9da7c01 100644
--- a/include/linux/ieee802154.h
+++ b/include/linux/ieee802154.h
@@ -208,7 +208,8 @@ static inline bool ieee802154_is_valid_extended_addr(const __le64 addr)
* This is currently a workaround because neighbor discovery can't
* deal with short addresses types right now.
*/
- return ((addr != 0x0000000000000000) || (addr != 0xffffffffffffffff));
+ return ((addr != 0x0000000000000000ULL) ||
+ (addr != 0xffffffffffffffffULL));
}
#endif /* LINUX_IEEE802154_H */
--
2.1.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH bluetooth-next 2/6] ieee802154: fix byteorder issues
2014-11-02 20:43 [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 1/6] ieee802154: add missing ULL definition Alexander Aring
@ 2014-11-02 20:43 ` Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 3/6] mac802154: " Alexander Aring
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Alexander Aring @ 2014-11-02 20:43 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
This patch fix byteorder issues which occurs because we compare __le64
with an host byteorder value. Simple add a cpu_to_le64 to convert the
host byteorder values to __le64.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reported-by: Marcel Holtmann <marcel@holtmann.org>
---
include/linux/ieee802154.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/ieee802154.h b/include/linux/ieee802154.h
index 9da7c01..5d9e745 100644
--- a/include/linux/ieee802154.h
+++ b/include/linux/ieee802154.h
@@ -24,6 +24,7 @@
#define LINUX_IEEE802154_H
#include <linux/types.h>
+#include <asm/byteorder.h>
#define IEEE802154_MTU 127
#define IEEE802154_MIN_PSDU_LEN 5
@@ -208,8 +209,8 @@ static inline bool ieee802154_is_valid_extended_addr(const __le64 addr)
* This is currently a workaround because neighbor discovery can't
* deal with short addresses types right now.
*/
- return ((addr != 0x0000000000000000ULL) ||
- (addr != 0xffffffffffffffffULL));
+ return ((addr != cpu_to_le64(0x0000000000000000ULL)) ||
+ (addr != cpu_to_le64(0xffffffffffffffffULL)));
}
#endif /* LINUX_IEEE802154_H */
--
2.1.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH bluetooth-next 3/6] mac802154: fix byteorder issues
2014-11-02 20:43 [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 1/6] ieee802154: add missing ULL definition Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 2/6] ieee802154: fix byteorder issues Alexander Aring
@ 2014-11-02 20:43 ` Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 4/6] ieee802154: sysfs: add missing include Alexander Aring
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Alexander Aring @ 2014-11-02 20:43 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
Running make C=2 occurs these warnings:
cast from restricted __be64
incorrect type in argument 1 (different base types)
expected unsigned long long[unsigned] [usertype] val
got restricted __be64 [usertype]<noident>
cast from restricted __be64
cast to restricted __le64
This patch fix these warnings by forcing to __le64 type and using swabp64
instead swab64.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reported-by: Marcel Holtmann <marcel@holtmann.org>
---
include/net/mac802154.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/net/mac802154.h b/include/net/mac802154.h
index c17acbd..8b0c26b 100644
--- a/include/net/mac802154.h
+++ b/include/net/mac802154.h
@@ -215,12 +215,12 @@ struct ieee802154_ops {
};
/**
- * ieee802154_netdev_to_extended_addr - convert __be64 u8 pointer to __le64
+ * ieee802154_netdev_to_extended_addr - convert big endian 64 byte void pointer to __le64
* @dev_addr: big endian address pointer like netdevice dev_addr attribute
*/
-static inline __le64 ieee802154_netdev_to_extended_addr(const u8 *dev_addr)
+static inline __le64 ieee802154_netdev_to_extended_addr(const void *dev_addr)
{
- return (__le64)swab64(*((__be64 *)dev_addr));
+ return (__force __le64)swab64p(dev_addr);
}
/* Basic interface to register ieee802154 hwice */
--
2.1.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH bluetooth-next 4/6] ieee802154: sysfs: add missing include
2014-11-02 20:43 [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings Alexander Aring
` (2 preceding siblings ...)
2014-11-02 20:43 ` [PATCH bluetooth-next 3/6] mac802154: " Alexander Aring
@ 2014-11-02 20:43 ` Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 5/6] mac802154: cfg: " Alexander Aring
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Alexander Aring @ 2014-11-02 20:43 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
Running make C=2 occurs in warnings:
symbol 'wpan_phy_class' was not declared. Should it be static?
symbol 'wpan_phy_sysfs_init' was not declared. Should it be static?
symbol 'wpan_phy_sysfs_exit' wasnot declared. Should it be static?
This patch adds a missing include "sysfs.h" to solve these warnings.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reported-by: Marcel Holtmann <marcel@holtmann.org>
---
net/ieee802154/sysfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ieee802154/sysfs.c b/net/ieee802154/sysfs.c
index c6e0380..8819998 100644
--- a/net/ieee802154/sysfs.c
+++ b/net/ieee802154/sysfs.c
@@ -18,6 +18,7 @@
#include <net/cfg802154.h>
#include "core.h"
+#include "sysfs.h"
static inline struct cfg802154_registered_device *
dev_to_rdev(struct device *dev)
--
2.1.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH bluetooth-next 5/6] mac802154: cfg: add missing include
2014-11-02 20:43 [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings Alexander Aring
` (3 preceding siblings ...)
2014-11-02 20:43 ` [PATCH bluetooth-next 4/6] ieee802154: sysfs: add missing include Alexander Aring
@ 2014-11-02 20:43 ` Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 6/6] ieee802154: remove unnecessary functions Alexander Aring
2014-11-02 20:52 ` [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings Marcel Holtmann
6 siblings, 0 replies; 8+ messages in thread
From: Alexander Aring @ 2014-11-02 20:43 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
Running make C=2 occurs warning:
symbol 'mac802154_config_ops' was not declared. Should it be static?
This patch adds a missing include in cfg.c to solve this warning.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reported-by: Marcel Holtmann <marcel@holtmann.org>
---
net/mac802154/cfg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/mac802154/cfg.c b/net/mac802154/cfg.c
index 75a5d25..0c69b44 100644
--- a/net/mac802154/cfg.c
+++ b/net/mac802154/cfg.c
@@ -16,6 +16,7 @@
#include <net/cfg802154.h>
#include "ieee802154_i.h"
+#include "cfg.h"
static struct net_device *
ieee802154_add_iface_deprecated(struct wpan_phy *wpan_phy,
--
2.1.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH bluetooth-next 6/6] ieee802154: remove unnecessary functions
2014-11-02 20:43 [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings Alexander Aring
` (4 preceding siblings ...)
2014-11-02 20:43 ` [PATCH bluetooth-next 5/6] mac802154: cfg: " Alexander Aring
@ 2014-11-02 20:43 ` Alexander Aring
2014-11-02 20:52 ` [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings Marcel Holtmann
6 siblings, 0 replies; 8+ messages in thread
From: Alexander Aring @ 2014-11-02 20:43 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
This patch fixes commit c7420c367d63a7e1414e010afb52c3837fd9134e
("mac802154: move mac_params functions into mac_cmd"). The mac_params
functions wasn't deleted by this commit.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reported-by: Marcel Holtmann <marcel@holtmann.org>
---
net/mac802154/iface.c | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index ceedf3e..0c9d00c 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -127,28 +127,6 @@ static int mac802154_wpan_mac_addr(struct net_device *dev, void *p)
return mac802154_wpan_update_llsec(dev);
}
-int mac802154_set_mac_params(struct net_device *dev,
- const struct ieee802154_mac_params *params)
-{
- struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
-
- mutex_lock(&sdata->local->iflist_mtx);
- sdata->mac_params = *params;
- mutex_unlock(&sdata->local->iflist_mtx);
-
- return 0;
-}
-
-void mac802154_get_mac_params(struct net_device *dev,
- struct ieee802154_mac_params *params)
-{
- struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
-
- mutex_lock(&sdata->local->iflist_mtx);
- *params = sdata->mac_params;
- mutex_unlock(&sdata->local->iflist_mtx);
-}
-
static int mac802154_slave_open(struct net_device *dev)
{
struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
--
2.1.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings
2014-11-02 20:43 [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings Alexander Aring
` (5 preceding siblings ...)
2014-11-02 20:43 ` [PATCH bluetooth-next 6/6] ieee802154: remove unnecessary functions Alexander Aring
@ 2014-11-02 20:52 ` Marcel Holtmann
6 siblings, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2014-11-02 20:52 UTC (permalink / raw)
To: Alexander Aring; +Cc: linux-wpan, kernel
Hi Alex,
> This patch series fixes warning when building with "make C=2". This was
> reported by Marcel Holtmann which told me to run "make C=2" and solve
> these warnings. Most of the issues was forgotten includes and byte ordering
> handling.
>
> Alexander Aring (6):
> ieee802154: add missing ULL definition
> ieee802154: fix byteorder issues
> mac802154: fix byteorder issues
> ieee802154: sysfs: add missing include
> mac802154: cfg: add missing include
> ieee802154: remove unnecessary functions
>
> include/linux/ieee802154.h | 4 +++-
> include/net/mac802154.h | 6 +++---
> net/ieee802154/sysfs.c | 1 +
> net/mac802154/cfg.c | 1 +
> net/mac802154/iface.c | 22 ----------------------
> 5 files changed, 8 insertions(+), 26 deletions(-)
all 6 patches have been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-11-02 20:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-02 20:43 [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 1/6] ieee802154: add missing ULL definition Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 2/6] ieee802154: fix byteorder issues Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 3/6] mac802154: " Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 4/6] ieee802154: sysfs: add missing include Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 5/6] mac802154: cfg: " Alexander Aring
2014-11-02 20:43 ` [PATCH bluetooth-next 6/6] ieee802154: remove unnecessary functions Alexander Aring
2014-11-02 20:52 ` [PATCH bluetooth-next 0/6] ieee802154: solve make C=2 warnings Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox