1 From 2f94acde42b70c81129b398c44aa09411974a16d Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Sun, 25 Oct 2015 22:16:48 +0100
4 Subject: [PATCH 2/3] MIPS: BCM47xx: Fix some WARNINGs pointed in sprom.c by
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 There are still few left:
11 1) Most of them about lines over 80 chars (increased readability exception)
12 2) Wrong parsing of preprocessor macros
14 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
15 Cc: linux-mips@linux-mips.org
16 Cc: Hauke Mehrtens <hauke@hauke-m.de>
17 Patchwork: https://patchwork.linux-mips.org/patch/11356/
18 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
20 arch/mips/bcm47xx/sprom.c | 25 ++++++++++++++++---------
21 1 file changed, 16 insertions(+), 9 deletions(-)
23 --- a/arch/mips/bcm47xx/sprom.c
24 +++ b/arch/mips/bcm47xx/sprom.c
25 @@ -60,9 +60,9 @@ static int get_nvram_var(const char *pre
28 #define NVRAM_READ_VAL(type) \
29 -static void nvram_read_ ## type (const char *prefix, \
30 - const char *postfix, const char *name, \
31 - type *val, type allset, bool fallback) \
32 +static void nvram_read_ ## type(const char *prefix, \
33 + const char *postfix, const char *name, \
34 + type *val, type allset, bool fallback) \
38 @@ -422,7 +422,10 @@ static void bcm47xx_fill_sprom_path_r458
41 for (i = 0; i < ARRAY_SIZE(sprom->core_pwr_info); i++) {
42 - struct ssb_sprom_core_pwr_info *pwr_info = &sprom->core_pwr_info[i];
43 + struct ssb_sprom_core_pwr_info *pwr_info;
45 + pwr_info = &sprom->core_pwr_info[i];
47 snprintf(postfix, sizeof(postfix), "%i", i);
48 nvram_read_u8(prefix, postfix, "maxp2ga",
49 &pwr_info->maxpwr_2g, 0, fallback);
50 @@ -470,7 +473,10 @@ static void bcm47xx_fill_sprom_path_r45(
53 for (i = 0; i < ARRAY_SIZE(sprom->core_pwr_info); i++) {
54 - struct ssb_sprom_core_pwr_info *pwr_info = &sprom->core_pwr_info[i];
55 + struct ssb_sprom_core_pwr_info *pwr_info;
57 + pwr_info = &sprom->core_pwr_info[i];
59 snprintf(postfix, sizeof(postfix), "%i", i);
60 nvram_read_u16(prefix, postfix, "pa2gw3a",
61 &pwr_info->pa_2g[3], 0, fallback);
62 @@ -535,10 +541,11 @@ static void bcm47xx_fill_sprom_ethernet(
63 nvram_read_macaddr(prefix, "il0macaddr", sprom->il0mac, fallback);
65 /* The address prefix 00:90:4C is used by Broadcom in their initial
66 - configuration. When a mac address with the prefix 00:90:4C is used
67 - all devices from the same series are sharing the same mac address.
68 - To prevent mac address collisions we replace them with a mac address
69 - based on the base address. */
70 + * configuration. When a mac address with the prefix 00:90:4C is used
71 + * all devices from the same series are sharing the same mac address.
72 + * To prevent mac address collisions we replace them with a mac address
73 + * based on the base address.
75 if (!bcm47xx_is_valid_mac(sprom->il0mac)) {