struct blob_attr *tb_dev[__DEV_ATTR_MAX];
struct blob_attr *tb_b[__BOND_ATTR_MAX];
enum dev_change_type ret = DEV_CONFIG_APPLIED;
- unsigned long diff;
+ unsigned long diff[2] = {};
struct bonding_device *bdev;
- BUILD_BUG_ON(sizeof(diff) < __BOND_ATTR_MAX / 8);
+ BUILD_BUG_ON(sizeof(diff[0]) < __BOND_ATTR_MAX / 8);
BUILD_BUG_ON(sizeof(diff) < __DEV_ATTR_MAX / 8);
bdev = container_of(dev, struct bonding_device, dev);
blobmsg_parse(device_attr_list.params, __DEV_ATTR_MAX, otb_dev,
blob_data(bdev->config_data), blob_len(bdev->config_data));
- diff = 0;
- uci_blob_diff(tb_dev, otb_dev, &device_attr_list, &diff);
- if (diff)
+ uci_blob_diff(tb_dev, otb_dev, &device_attr_list, diff);
+ if (diff[0] | diff[1])
ret = DEV_CONFIG_RESTART;
blobmsg_parse(bonding_attrs, __BOND_ATTR_MAX, otb_b,
blob_data(bdev->config_data), blob_len(bdev->config_data));
- diff = 0;
- uci_blob_diff(tb_b, otb_b, &bonding_attr_list, &diff);
- if (diff & ~(1 << BOND_ATTR_PORTS))
+ diff[0] = 0;
+ uci_blob_diff(tb_b, otb_b, &bonding_attr_list, diff);
+ if (diff[0] & ~(1 << BOND_ATTR_PORTS))
ret = DEV_CONFIG_RESTART;
bonding_config_init(dev);
struct blob_attr *tb_br[__BRIDGE_ATTR_MAX];
enum dev_change_type ret = DEV_CONFIG_APPLIED;
struct bridge_state *bst;
- unsigned long diff[2];
+ unsigned long diff[2] = {};
BUILD_BUG_ON(sizeof(diff) < __BRIDGE_ATTR_MAX / BITS_PER_LONG);
BUILD_BUG_ON(sizeof(diff) < __DEV_ATTR_MAX / BITS_PER_LONG);
blobmsg_parse(device_attr_list.params, __DEV_ATTR_MAX, otb_dev,
blob_data(bst->config_data), blob_len(bst->config_data));
- diff[0] = diff[1] = 0;
uci_blob_diff(tb_dev, otb_dev, &device_attr_list, diff);
if (diff[0] | diff[1]) {
ret = DEV_CONFIG_RESTART;
struct blob_attr *ntb[__DEV_ATTR_MAX];
struct blob_attr *otb[__DEV_ATTR_MAX];
struct device *dev = if_old->main_dev.dev;
- unsigned long diff = 0;
+ unsigned long diff[2] = {};
BUILD_BUG_ON(sizeof(diff) < __DEV_ATTR_MAX / 8);
blobmsg_parse(device_attr_list.params, __DEV_ATTR_MAX, ntb,
blob_data(if_new->config), blob_len(if_new->config));
- uci_blob_diff(ntb, otb, &device_attr_list, &diff);
- return diff;
+ uci_blob_diff(ntb, otb, &device_attr_list, diff);
+
+ return diff[0] | diff[1];
}
static void